exam questions

Exam 350-901 All Questions

View all questions & answers for the 350-901 exam

Exam 350-901 topic 1 question 242 discussion

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



Refer to the exhibit. An engineer needs to implement REST API error handling when a timeout or rate limit scenario is present. Which code snippet must be placed into the blank in the code to complete the API request?

  • A.
  • B.
  • C.
  • D.
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
fb48
Highly Voted 2 years, 3 months ago
Answer C: 429 produces "retry-after" which is used in the code. 408 does not produce "retry-after" so you need to define a backoff-time yourself
upvoted 16 times
...
[Removed]
Highly Voted 2 years, 3 months ago
Selected Answer: D
429 is too many requests and therefore you back off continuously until you are allowed to request again, whereas 408 is request timeout because client did not produce a request within the time that the server is prepared to wait.
upvoted 6 times
it0
2 years, 3 months ago
Based on this answer it should be C
upvoted 2 times
[Removed]
2 years, 2 months ago
How is that possible when I selected D specifically? D is the correct answer. The code shown in the exhibit shows the code to process 429 errors. So before that, you would check for 408 errors with if response.status_code == 408:
upvoted 3 times
julianmansa
1 year, 5 months ago
C is the correct answer because the code gets the "retry-after" in the answer segment which the 408 does not provide. This is why it does not access the "retry-after" header when you read the remainder of the code.
upvoted 2 times
...
...
...
...
814d1c6
Most Recent 2 months, 3 weeks ago
Selected Answer: D
Answer D for sure. First catch the timeout (408, which don’t give back a retry-after). If that is not the case catch the 429 which gives a timeout and is further handled in the code given.
upvoted 1 times
...
Amycert
7 months, 2 weeks ago
Selected Answer: C
C is the only one that makes sense. "retry after" is for rate limiting errors
upvoted 2 times
...
network_enthusiast
1 year, 3 months ago
Selected Answer: C
C is the correct answer . 429 ==> has retry after header and 408 dont.
upvoted 2 times
...
VincentVega
1 year, 7 months ago
Selected Answer: C
С is correct Best explanation: 429 produces "retry-after" which is used in the code. 408 does not produce "retry-after" so you need to define a backoff-time yourself
upvoted 1 times
...
ldlpi
2 years, 1 month ago
Selected Answer: C
As f2b48 says: 429 produces "retry-after" which is used in the code. 408 does not produce "retry-after" so you need to define a backoff-time yourself
upvoted 3 times
...
aram73322
2 years, 2 months ago
Why not B?
upvoted 2 times
aram73322
2 years, 2 months ago
sorry, definitely not B, should be C
upvoted 1 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