Skip to content

Update /openapi-python-client to version 0.26 or higher #120

@ckunki

Description

@ckunki

Version 0.26 of openapi-python-client introduced default responses,

This unfortunately revealed a bug in the implementation of the Exasol SaaS REST API.

See IntRef and CI Build log:

with testee.database(database_name, ignore_delete_failure=True) as db:
/usr/lib/python3.12/contextlib.py:144: in __exit__
    next(self.gen)
exasol/saas/client/api_access.py:299: in database
    response = self.delete_database(db.id, ignore_delete_failure)
exasol/saas/client/api_access.py:271: in delete_database
    return delete_database.sync_detailed(
exasol/saas/client/openapi/api/databases/delete_database.py:87: in sync_detailed
    return _build_response(client=client, response=response)
exasol/saas/client/openapi/api/databases/delete_database.py:55: in _build_response
    parsed=_parse_response(client=client, response=response),
exasol/saas/client/openapi/api/databases/delete_database.py:43: in _parse_response
    response_default = ApiError.from_dict(response.json())
cls = <class 'exasol.saas.client.openapi.models.api_error.ApiError'>
src_dict = {'code': 404, 'handler': 'saas-api-service-databases-staging-deleteDatabase', 
'logId': '2025/10/27/[$LATEST]e2439ded012e467cabfbd39d3fe7254f',
 'message': 'Could not find database with id: 4oJGtNv_SPq-DckM4FgHgg', ...}
    @classmethod
    def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
        d = dict(src_dict)
>       status = d.pop("status")
E       KeyError: 'status'

exasol/saas/client/openapi/models/api_error.py:92: KeyError

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactoringCode improvement without behavior change

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions