#70 raise a proper error when health checks failed
Merged by ralph. Opened by mjia.
mjia/waiverdb healthcheck  into  master

Download 70.patch

Using assert statements is not encourged in production, because they
will get stripped out of .pyo files and not run. Instead, we should
raise RuntimeError.

rebased

To keep it equivalent this should be: if result != 1

rebased

Rebased to address the comment.

Looks good here.

I dunno - do you want to return a response tuple with an explicit error code. Maybe 503? The exception here generating a 500 works just as well. :+1:

Yeah, that reminds to return the errors in JSON and this error will be handled properly there.

Pull-Request has been merged by ralph

Metadata