exam questions

Exam 350-901 All Questions

View all questions & answers for the 350-901 exam

Exam 350-901 topic 1 question 289 discussion

Actual exam question from Cisco's 350-901
Question #: 289
Topic #: 1
[All 350-901 Questions]



Refer to the exhibit. A network engineer needs to handle API errors in their requests when users do not have permission to access the resource, even if they are authenticated and authorized. Which line of code needs to be placed on the snippet where the code is missing to handle these API errors?

  • A. if r.raise_for_status() == 401
  • B. if r.raise_for_status() == 403
  • C. if r.status_code == 403
  • D. if r.status_code == 401
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
hatsec
Highly Voted 9 months, 4 weeks ago
C is correct: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403
upvoted 7 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago