Skip to content

Commit 84e4e66

Browse files
committed
feat: python warnings
1 parent 36aa74e commit 84e4e66

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

templates/python/package/client.py.twig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ class Client:
9191

9292
response.raise_for_status()
9393

94+
warnings = response.headers.get('x-{{ spec.title | lower }}-warning')
95+
if warnings:
96+
for warning in warnings.split(';'):
97+
print(f'Warning: {warning}')
98+
9499
content_type = response.headers['Content-Type']
95100

96101
if response_type == 'location':

0 commit comments

Comments
 (0)