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?
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.
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:
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.
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.
С 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
This section is not available anymore. Please use the main Exam Page.350-901 Exam Questions
Log in to ExamTopics
Sign in:
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.
fb48
Highly Voted 2 years, 3 months ago[Removed]
Highly Voted 2 years, 3 months agoit0
2 years, 3 months ago[Removed]
2 years, 2 months agojulianmansa
1 year, 5 months ago814d1c6
Most Recent 2 months, 3 weeks agoAmycert
7 months, 2 weeks agonetwork_enthusiast
1 year, 3 months agoVincentVega
1 year, 7 months agoldlpi
2 years, 1 month agoaram73322
2 years, 2 months agoaram73322
2 years, 2 months ago