Error Handling

It is essential to ensure that Fiber detects all errors that occur during the execution of handlers and middleware.

You must return them to the handler function, where Fiber will capture and process them.

Fiber does not handle panics by default. To recover a panic generated by any handler on the stack, you need to include the Recover middleware.

You can use Fiber's custom error framework to pass additional status code using fiber.NewError().

It is optional to pass a message; if left blank, defaults to status code message (Ex: 404 equals "Not Found").

For more information on error handling, click here

error_handling.go