Is your feature request related to a problem? Please describe.
At times, an exception will be raised with little to no context whereas the API response will contain some helpful information. For example, when trying to post a Challenge with a name that already exists in the database, our package would currently return:
However, the API response has message content containing:
{'Challenge with name Test_Challenge_Name already exists in the database'}
Ideally, we could include this message in our custom exception message, rather than the generic 'An HTTP error occurred'.
Describe the solution you'd like
When present, the API response message should be returned to the user in the exception. If no message is present, we can use a default message.
Is your feature request related to a problem? Please describe. At times, an exception will be raised with little to no context whereas the API response will contain some helpful information. For example, when trying to post a Challenge with a name that already exists in the database, our package would currently return:
However, the API response has message content containing:
Ideally, we could include this message in our custom exception message, rather than the generic 'An HTTP error occurred'.
Describe the solution you'd like When present, the API response message should be returned to the user in the exception. If no message is present, we can use a default message.
Describe alternatives you've considered N/A
Additional context N/A