Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295049

Improve default exception handling

$
0
0

Problem/Motivation

The default exception handling we have always prints the same message - "The website encountered an unexpected error. Please try again later.". This is fine if it is a 5xx error, but not if it's a 4xx error. E.g. If you go to a REST endpoint that only accepts JSON POST requests in your browser.

Proposed resolution

Check if the error is displayable and if so, use the message provided for HttpExceptionInterface exceptions, but some sensible defaults otherwise.

Remaining tasks

Maybe we also need generic messages for 4xx, 5xx codes? Although, not sure how they would be used ever if it wasn't an HttpExceptionInterface.

User interface changes

Better errors?

API changes

N/A

Data model changes


Viewing all articles
Browse latest Browse all 295049

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>