This message was deleted.
# ask-for-help
s
This message was deleted.
l
@Jian Shen Yap can you help me here? sorry for tagging you directly, but I really need to push this forward for our BentoML assessment 🙏
j
Hello, can you produce a minimal example on how you would use it and how you would like BentoML behave? You can consider using
bentoml.exceptions
classes!
j
Hi, since I am currently looking into this as well, I think what Luis is trying to do is to get BentoML to return some sort of customized JSON when facing error 500 instead of the
An error has occurred in BentoML user code when handling this request, find the error details in server logs
error message. Example of custom json would be sth like this:
{"status": "fail", "reason": "Something has failed", "Timestamp": <timestamp>}
FastAPI equivalent of doing this would be raising HTTPException(500, custom_dict_with_error_details). But from the main body of the text, it seems that the exception has been intercepted by BentoML framework.
l
Thanks @Janson Liew, that's pretty much what I am interesting in. Sorry @Jian Shen Yap for not getting back to you
j
Hi @Jian Shen Yap, is there any update regarding this?