1
0
mirror of https://github.com/labstack/echo.git synced 2024-11-24 08:22:21 +02:00

Update guide.md

This commit is contained in:
matrika 2015-05-06 18:42:45 -07:00
parent df8bd3be10
commit 8db65a9714

View File

@ -224,8 +224,10 @@ e.Index("index.html")
Echo advocates centralized HTTP error handling by returning `*echo.HTTPError` from
middleware and handlers.
- In debug mode, write stack trace to the HTTP response.
- Customize HTTP responses, may be using a pretty HTML template.
Why?
- Debug by writing stack trace to the HTTP response.
- Customize HTTP responses.
- Recover from panics inside middleware or handlers.
For example, when a basic auth middleware finds invalid credentials it returns 401