Skip to content

Commit 936e028

Browse files
cloudant-sdks-automationemlaver
authored andcommitted
feat(generated): replace code with status_code in changes follower and examples
Generated SDK source code using: - Generator version 3.85.0 - Specification version 1.0.0-dev0.1.6 - Automation (cloudant-sdks) version 649772b Signed-off-by: cloudant-sdks-automation <[email protected]>
1 parent 3f75a4a commit 936e028

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ try:
318318
if put_database_result["ok"]:
319319
print(f'"{example_db_name}" database created.')
320320
except ApiException as ae:
321-
if ae.code == 412:
321+
if ae.status_code == 412:
322322
print(f'Cannot create "{example_db_name}" database, ' +
323323
'it already exists.')
324324

@@ -525,7 +525,7 @@ try:
525525
json.dumps(document, indent=2))
526526

527527
except ApiException as ae:
528-
if ae.code == 404:
528+
if ae.status_code == 404:
529529
print('Cannot delete document because either ' +
530530
f'"{example_db_name}" database or "{example_doc_id}" ' +
531531
'document was not found.')
@@ -585,7 +585,7 @@ try:
585585
print('You have deleted the document.')
586586

587587
except ApiException as ae:
588-
if ae.code == 404:
588+
if ae.status_code == 404:
589589
print('Cannot delete document because either ' +
590590
f'"{example_db_name}" database or "{example_doc_id}"' +
591591
'document was not found.')

0 commit comments

Comments
 (0)