Introduction
Built-in HTTP exceptions help you send clear error messages to users when something goes wrong in your app. They make error handling simple and consistent.
When a user tries to access a resource that does not exist.
When a user sends invalid data to your API.
When a user is not authorized to perform an action.
When the server encounters an unexpected error.
When you want to inform the client about request limits or forbidden actions.