How to provides informative error messages in Plugins?

Hi folks,
I’m trying to figure out how to have the plugin API return an informative error message, but the example APIs in the docs only shows 200 responses, I’ve tried defining both text and objects on 400, 401, 500 status responses, but chatgpt doesn’t seem to pass those error message to the user, and simple has blank output. Has anyone had success returning non-200 responses with informative error messages?

PS. I’m using nodejs on my backend.


Welcome to the forum!

Are you aware of the chatgpt-retrieval-plugin example on GitHub in the OpenAI account?

Below is a search for status_code of the repository, hopefully these are examples of what you seek.

@EricGT Thanks for the link! Have you found that ChatGPT recognizes the errors and gives the user appropriate feedback?

As with most ChatGPT plugins some days are better than others and you learn best from the big mistakes. The only real advice I can give is just jump in, learn as you go and if you ask questions here hopefully you will get good information. :slightly_smiling_face: