OpenAI-Unity icon indicating copy to clipboard operation
OpenAI-Unity copied to clipboard

Handle error in async void DispatchRequest

Open RemiDrouot opened this issue 2 years ago • 0 comments

Hi,

I found some issues when request.downloadHandler.text retrieve an error message.

Because the lines retrieved are like that ErrorMessageHandle

and after you try to convert them with: var data = JsonConvert.DeserializeObject<T>(value, jsonSerializerSettings); But this give a error exception because the json format is not correct.

I have done some changes to fix this https://codefile.io/f/HWLrBZPdhh

Tell me if it's look good for you my fixes.

RemiDrouot avatar Jun 02 '23 12:06 RemiDrouot