The panko.api.middleware Module

The panko.api.middleware Module

Middleware to replace the plain text message body of an error response with one formatted so the client can parse it.

Based on pecan.middleware.errordocument

service None

Bases: object

Replace error body with something the client can parse.

static ParsableErrorMiddleware.best_match_language(accept_language)[source]

Determines best available locale from the Accept-Language header.

Returns

the best language match or None if the ‘Accept-Language’ header was not available in the request.

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.