Skip to content

Commit 3fce0b4

Browse files
Update openapi.json after server side changes + improve error handling (#133)
* update workflow before publishing python package * fix dependency issue and bump version * point to website in project description * fix broken dependency * improve doc * add github token to download artifacts * ensure only read-access @wvangeit * yet another attempt at downloading artifacts * make sure to use repo that ran the trigger wf * another attempt at fixing * change owner * allow publishing to testpypi also when pr * minor change * revert minor (but breaking) change * minor fix * add debug messages * another debug message * hopefully the final version * final fix * minor fix * move master and tag to individual jobs * add debug messages * dev->post * add python script for determining semantic version * minor changes * minor changes * improve error handling and add version file to artifacts * check if release * minor fix * ensure to enter venv * also when tagging * source venv in publishin workflow * ensure only master * add script for testing 'pure' semver * adapt workflows to new python script * minor change * attempt to evaluate expressions correctly * several fixes to fix tests * ensure repo is checked out in publish workflow * several small fixes * cleanup * debug * minor cleanup * mionr changes * add debug message * minor change * minor change * yet another try * minor change * minor change * minor change * mionr change * minor changes * correct workflow run id * cosmetic change * avoid using gh * change to a single job for publishing * minor cleanup * swap loops in clean up jobs * correction * RequestError -> ApiException * update openapi.json * inherrit RequestError from ApiException
1 parent 703b6ab commit 3fce0b4

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

api/openapi.json

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"info": {
44
"title": "osparc.io web API (dev)",
55
"description": "osparc-simcore public API specifications",
6-
"version": "0.5.0-dev"
6+
"version": "0.5.1-dev"
77
},
88
"paths": {
99
"/v0/meta": {
@@ -2270,7 +2270,14 @@
22702270
],
22712271
"responses": {
22722272
"200": {
2273-
"description": "Successful Response"
2273+
"description": "Successful Response",
2274+
"content": {
2275+
"application/x-ndjson": {
2276+
"schema": {
2277+
"type": "string"
2278+
}
2279+
}
2280+
}
22742281
},
22752282
"422": {
22762283
"description": "Validation Error",
@@ -4065,11 +4072,13 @@
40654072
"properties": {
40664073
"first_name": {
40674074
"title": "First Name",
4075+
"maxLength": 255,
40684076
"type": "string",
40694077
"example": "James"
40704078
},
40714079
"last_name": {
40724080
"title": "Last Name",
4081+
"maxLength": 255,
40734082
"type": "string",
40744083
"example": "Maxwell"
40754084
},
@@ -4125,11 +4134,13 @@
41254134
"properties": {
41264135
"first_name": {
41274136
"title": "First Name",
4137+
"maxLength": 255,
41284138
"type": "string",
41294139
"example": "James"
41304140
},
41314141
"last_name": {
41324142
"title": "Last Name",
4143+
"maxLength": 255,
41334144
"type": "string",
41344145
"example": "Maxwell"
41354146
}

clients/python/client/osparc/_exceptions.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from functools import wraps
22

33
from httpx import HTTPStatusError
4+
from osparc_client import ApiException
45

56

67
class VisibleDeprecationWarning(UserWarning):
@@ -10,8 +11,8 @@ class VisibleDeprecationWarning(UserWarning):
1011
"""
1112

1213

13-
class RequestError(Exception):
14-
"""For exceptions encountered when performing HTTP requests."""
14+
class RequestError(ApiException):
15+
pass
1516

1617

1718
def handle_exceptions(func):

clients/python/client/osparc/_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def __iter__(self) -> Generator[T, None, None]:
7070
try:
7171
response.raise_for_status()
7272
except httpx.HTTPStatusError as e:
73-
raise RequestError() from e
73+
raise RequestError(f"{e}") from e
7474
page = self._api_client._ApiClient__deserialize(response.json(), type(page))
7575

7676

0 commit comments

Comments
 (0)