httk.serve.web.model.errors¶
Define public exceptions raised while serving or publishing web sites.
Exceptions¶
Represent a handled web failure with an HTTP status code. |
|
Represent a route or site resource that cannot be found. |
|
Represent a failure while injecting a site function result. |
|
Base error for a widget invocation with source-aware diagnostics. |
|
Report a widget invocation that cannot be parsed. |
|
Report a widget that cannot be discovered or loaded. |
|
Report a widget declaration that violates its contract. |
|
Report a widget that failed while producing output. |
Module Contents¶
- exception httk.serve.web.model.errors.WebError(message, *, status_code=500)¶
Bases:
ExceptionRepresent a handled web failure with an HTTP status code.
- Parameters:
- status_code = 500¶
- exception httk.serve.web.model.errors.NotFoundError(message='Not Found')¶
Bases:
WebErrorRepresent a route or site resource that cannot be found.
- Parameters:
message (str) – Human-readable not-found message.
- exception httk.serve.web.model.errors.FunctionInjectionError(message)¶
Bases:
WebErrorRepresent a failure while injecting a site function result.
- Parameters:
message (str) – Human-readable failure message.
- exception httk.serve.web.model.errors.WidgetError(message, *, source_path=None, line=None, column=None, snippet=None, widget_name=None, widget_id=None, correction=None)¶
Bases:
WebErrorBase error for a widget invocation with source-aware diagnostics.
- phase = 'widget'¶
- exception httk.serve.web.model.errors.WidgetParseError(message, *, source_path=None, line=None, column=None, snippet=None, widget_name=None, widget_id=None, correction=None)¶
Bases:
WidgetErrorReport a widget invocation that cannot be parsed.
- phase = 'parse'¶
- exception httk.serve.web.model.errors.WidgetDiscoveryError(message, *, source_path=None, line=None, column=None, snippet=None, widget_name=None, widget_id=None, correction=None)¶
Bases:
WidgetErrorReport a widget that cannot be discovered or loaded.
- phase = 'discovery'¶
- exception httk.serve.web.model.errors.WidgetValidationError(message, *, source_path=None, line=None, column=None, snippet=None, widget_name=None, widget_id=None, correction=None)¶
Bases:
WidgetErrorReport a widget declaration that violates its contract.
- phase = 'validation'¶
- exception httk.serve.web.model.errors.WidgetRenderingError(message, *, source_path=None, line=None, column=None, snippet=None, widget_name=None, widget_id=None, correction=None)¶
Bases:
WidgetErrorReport a widget that failed while producing output.
- phase = 'rendering'¶