Add a middleware to handle 503 errors

VERIFIED FIXED

Status

Hello (Loop)
Server
VERIFIED FIXED
4 years ago
3 years ago

People

(Reporter: alexis, Assigned: natim)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

4 years ago
We're currently duplicating a lot of times code like that:

if (err) {                                
  logError(err);                          
  res.json(503, "Service Unavailable");   
}                                         

I believe this could add an utility function instead, and that we could call res.error(err) for instance, that would do the necessary things for us.
(Assignee)

Updated

4 years ago
Assignee: nobody → rhubscher
(Assignee)

Comment 1

4 years ago
Created attachment 8441349 [details] [review]
Link to github PR
Attachment #8441349 - Flags: review?(alexis+bugs)
(Assignee)

Updated

4 years ago
Status: NEW → ASSIGNED
(Reporter)

Comment 2

4 years ago
Comment on attachment 8441349 [details] [review]
Link to github PR

r+wc
Attachment #8441349 - Flags: review?(alexis+bugs) → review+
(Reporter)

Comment 3

4 years ago
https://github.com/mozilla-services/loop-server/commit/38214b8a95ca2d01e4f85c6a8cbeced52dd8fda9
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Fix either went out with a previous deployment to Production or has been superceded by new code...
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.