File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 318318 if put_database_result[" ok" ]:
319319 print (f ' " { example_db_name} " database created. ' )
320320except 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
525525 json.dumps(document, indent = 2 ))
526526
527527except 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.' )
585585 print (' You have deleted the document.' )
586586
587587except 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.' )
You can’t perform that action at this time.
0 commit comments