Closed fsantamaria1 closed 1 year ago
I added this conditional statement:
if gpt_resp.status_code >= 400: error_data =gpt_resp.json().get('error', {}) error_code = error_data.get('code', None) error_message = error_data.get('message', "An error occurred") return { 'successs': False, 'error_code': error_code, 'message': error_message, 'status_code': gpt_resp.status_code }, gpt_resp.status_code
The GUI displays the JSON, but it is descriptive enough.
This will help users troubleshoot when they are having API issues such as invalid API keys and expired free trials.
I added this conditional statement:
The GUI displays the JSON, but it is descriptive enough.
This will help users troubleshoot when they are having API issues such as invalid API keys and expired free trials.