Application error type shared by services, the JSON API and the web UI.
AppError renders as a JSON error body. The web UI router installs a
middleware that picks up the ErrorInfo response extension and replaces
the body with an HTML error page (or a redirect to the login page).