looker-open-source / sdk-codegen

One SDK to rule them all, and in the codegen bind them
MIT License
232 stars 195 forks source link

python SDKError __str__ bug #1479

Closed syvokobylka closed 2 months ago

syvokobylka commented 4 months ago

Attempt to represent python SDKError object as a string leads to another exception happening

.....
except looker_sdk.error.SDKError as ex:
    logger.error(f"Some important data and {str(ex)}")

Call stack: 2024-07-04 11:35:58.130
TypeError: sequence item 0: expected str instance, ErrorDetail found 2024-07-04 11:35:58.130
{sep.join(self.errors)} 2024-07-04 11:35:58.130
File "/root/.pyenv/versions/3.10.5/lib/python3.10/site-packages/looker_sdk/error.py", line 85, in str

jeremytchang commented 2 months ago

Closing as fixed. https://github.com/looker-open-source/sdk-codegen/pull/1486