#239 Use more specific error codes for upstream errors
Merged by lholecek. Opened by acorvin.
acorvin/greenwave acorvin-fix-error-codes  into  master

Download 239.patch

Previously Greenwave returned a generic 500 error for issues connecting
to upstream services (e.g. WaiverDB). This change updates the error
handler to return a 502 or 504 for connection issues or timeout issues,
respectively.

This addresses https://pagure.io/greenwave/issue/203

Hm, we should still probably handle a generic 500 situation here in addition to the known 502 and 504 situations.

Maybe convert else to see if it is specifically a timeout error, then add an additional else on the end to cath "all other errors", the code for which would look a lot like the original code here.

rebased onto c506d17983d98615dff4238ad85ffc7dc3e20adc

@ralph good call, fixed. Also, can you tell me how to trigger a jenkins job for this change? I think that's a thing.

Amazingly, it is super hard. This is @jmolet is chasing down.

Without his work, you have to create your own jenkins job somewhere (I have one called greenwave-rbean in rcm-tools-jenkins) and configure it to point at this branch, and then start a build in the jenkins UI.

Commit 513d7d51 fixes this pull-request

Pull-Request has been merged by lholecek

Pull-Request has been merged by lholecek

Metadata