fastapi-health icon indicating copy to clipboard operation
fastapi-health copied to clipboard

How to return a failure + details about why?

Open bitsofinfo opened this issue 3 years ago • 0 comments

I don't see how I can get this to return a 503 (fail) + a custom detail as to why a particular check failed.

Seems that if I return any dict from a check function, that is treated as success. They only way to have a check "fail" is to return None or False.... and in those cases I can't return a dict of details....

anyway to acheive this?

bitsofinfo avatar Feb 03 '22 16:02 bitsofinfo