mixins.json_error
Handler mixin for writing JSON errors
-
class sprockets.mixins.json_error.JsonErrorMixin
Mixin to write errors as JSON.
-
write_error(status_code, **kwargs)
Suppress the automatic rendering of HTML code upon an error.
Parameters: |
- status_code (int) – The HTTP status code the HTTPError raised.
- kwargs (dict) – Automatically filled with exception information including
the error that was raised, the class of error raised, and an
object.
|