TheoKanning / openai-java

OpenAI Api Client in Java
MIT License
4.68k stars 1.16k forks source link

NullPointerException for error = null at Bad Request 400 #496

Open michael-sparrow opened 2 months ago

michael-sparrow commented 2 months ago

In ResponseBodyCallBack.onResponse() there is a Exception being instantiated for Bad Requests 400. Since the error of the Exception is null it causes a NullPointerException to be thrown instead of the OpenAiHttpException.