labd / commercetools-python-sdk

Commercetools Python SDK
https://commercetools-python-sdk.readthedocs.io/en/latest/
MIT License
17 stars 16 forks source link

General commercetools errors are not serialized #99

Closed davidweterings closed 3 years ago

davidweterings commented 4 years ago

Could not find discriminator schema General for field 'errors' ({'code': 'General', 'message': "Oops. This shouldn't happen."})

This happens when CT has downtime or general API errors:

'{"statusCode":500,"message":"Oops. This shouldn\'t happen.","errors":[{"code":"General","message":"Oops. This shouldn\'t happen."}]}'

davidweterings commented 4 years ago

Found another one: '{"statusCode":503,"message":"Temporary overloading","errors":[{"code":"OverCapacity","message":"Temporary overloading"}]}'

davidweterings commented 3 years ago

Fixed by PR'ing API reference and regenerating code for new error types.