Skip to content

Commit

Permalink
assign global error handler in server
Browse files Browse the repository at this point in the history
  • Loading branch information
juancwu committed Dec 18, 2024
1 parent 00d0568 commit 4d8d9ee
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions backend/internal/server/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ func New() (*Server, error) {

e := echo.New()

// set the global error handler for all incoming requests
e.HTTPErrorHandler = errorHandler

s := Server{
DBPool: pool,
Echo: e,
Expand Down

0 comments on commit 4d8d9ee

Please sign in to comment.