From 98ef8a47914cec0d9a126e16392bf5c27614b08d Mon Sep 17 00:00:00 2001 From: ckunki Date: Thu, 18 Apr 2024 09:20:45 +0200 Subject: [PATCH] Added raise_on_unexpected_status to user guide --- doc/user_guide/user-guide.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc/user_guide/user-guide.md b/doc/user_guide/user-guide.md index 24b35de..d721f23 100644 --- a/doc/user_guide/user-guide.md +++ b/doc/user_guide/user-guide.md @@ -1 +1,14 @@ # SaaS API for Python User Guide + +## Raise Error on Response Status Code Other Than 200 + +The default behavior of the API client is to return a response with a status code and optionally an attribute `parsed` containing the returned data. + +If you want the client to raise an exception for each response with a status other than 200 then please provide optional keyword argument `raise_on_unexpected_status=True`: + +```python +from exasol.saas.client.openapi.api.databases import list_databases + +client = AuthenticatedClient(host, token, raise_on_unexpected_status=True) +databases = list_databases.sync(client) +````