Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Recoverable error logged at ERROR level

In the error handling of horizon, recoverable error is logged at ERROR LEVEL.

if issubclass(exc_type, RECOVERABLE):
    wrap = True
    if not force_silence and not handled and (not ignore or force_log):
        log_method(error_color("Recoverable error: %s" % exc_value))
    if not ignore and not handled:
        messages.error(request, message or exc_value)
    if redirect:
        raise Http302(redirect)
    if not escalate:
        return RecoverableError  # return to normal code flow

Recoverable exceptions are typically application exception or validation error that the user can fix.

Should this be logged as warning or info instead?