Merge lp:~pedronis/ubuntu-push/panic-to-500 into lp:ubuntu-push
Proposed by
Samuele Pedroni
Status: | Merged |
---|---|
Approved by: | Samuele Pedroni |
Approved revision: | 10 |
Merged at revision: | 8 |
Proposed branch: | lp:~pedronis/ubuntu-push/panic-to-500 |
Merge into: | lp:ubuntu-push |
Diff against target: |
262 lines (+124/-26) 8 files modified
logger/logger.go (+9/-10) logger/logger_test.go (+20/-8) server/api/handlers.go (+1/-5) server/api/middleware.go (+40/-0) server/api/middleware_test.go (+46/-0) server/dev/server.go (+1/-0) server/listener/listener.go (+5/-1) server/listener/listener_test.go (+2/-2) |
To merge this branch: | bzr merge lp:~pedronis/ubuntu-push/panic-to-500 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
John Lenton (community) | Approve | ||
Review via email:
|
Commit message
introduce middleware in the http handling that recovers and converts panics into 500 errors, profit (remove 500 ad hoc code)
Description of the change
introduce middleware in the http handling that recovers and converts panics into 500 errors,
in the process change logger.Recoverf -> logger.PanicStackf which is less magical but more flexible,
profit (remove ad hoc 500 code)
To post a comment you must log in.
Neat.