exam questions

Exam 350-901 All Questions

View all questions & answers for the 350-901 exam

Exam 350-901 topic 1 question 70 discussion

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

A developer is building an application to access a website. When running the application, an HTTP 403 error code has been received.
How should the application be modified to handle this code?

  • A. Create a loop on cancel the operation and run a new one after the code is received.
  • B. Use exponential backoff when retrying distributed services and other remote endpoints.
  • C. Build a try/except around the urlopen to find errors occurring in the request.
  • D. Redirect the request to an internal web server and make a new request from the internal resource.
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
tswinn
Highly Voted 3 years, 8 months ago
I think C. 403 is forbidden. So a backoff/retry will not help here because the connection to the server worked.
upvoted 16 times
...
razvan999
Most Recent 1 year, 4 months ago
Selected Answer: C
400, 401, 403 and are part of unrecoverable errors and "there is nothing to do but involve yourself in the troubleshooting procedure": • Read the response status code returned by the REST API • Read the HTTP headers returned by the REST API • Read the body of the response
upvoted 1 times
...
doble_h
1 year, 6 months ago
Selected Answer: B
let's say that a rate limit is exceeded but for the day quota you may get a 403 forbidden to certain resources.
upvoted 1 times
MerlinTheWizard
10 months, 2 weeks ago
rate - rate exceeded, not forbidden
upvoted 1 times
...
...
Zizu007
1 year, 7 months ago
B: The correct approach to handle an HTTP 403 error code when building an application to access a website is: B. Use exponential backoff when retrying distributed services and other remote endpoints. Exponential backoff is a common strategy for handling temporary errors like HTTP 403 (Forbidden). It involves progressively increasing the time between retries when a request encounters an error, which helps to avoid overloading the server and gives it some time to recover. This approach is more efficient and considerate than the other options listed.
upvoted 2 times
kirrim
1 year, 6 months ago
HTTP 403 means Forbidden. The user has successfully authenticated, but they are not allowed access to whatever they are trying to access. No amount of backoffs or retries or looping is going to fix this. They can retry forever and will be told "no" repeatedly. You have to build in error handling to gracefully inform the user they just don't have permission to access the resource, and let them choose where to go from there. The error handling in Python is try/except around the HTTP GET request.
upvoted 3 times
...
...
mimimi
1 year, 7 months ago
Selected Answer: B
Sorry but you are all wrong. Software engineer here! error 403 is a forbidden error, and you have to check the reason field to address the error properly(it can have many reasons). One of the reasons can be "User rate limit exceeded", and as google suggest you should implement an exponential backoff. Here is the reference: https://developers.google.com/drive/api/guides/handle-errors#resolve_a_403_error_user_rate_limit_exceeded Be wise and choose B
upvoted 2 times
examtopicstroilevw
1 month, 3 weeks ago
I agree with ImADude. that's only one of the possible issues, and the question does not say exactly what the problem is.
upvoted 1 times
...
ImADude
11 months, 2 weeks ago
If that's only one of the reasons, then you can't say exponential backoff will definitely handle the issue. Alternatively, you should handle the error using a try/except block to ensure the application can gracefully deal with the unauthorized request and take necessary actions based on the specific reason for the 403 error.
upvoted 2 times
...
...
johntermlen
1 year, 9 months ago
Selected Answer: C
The correct answer is C. Build a try/except around the urlopen to find errors occurring in the request. An HTTP 403 error code indicates that the server is refusing to authorize the request. This can happen for a number of reasons, such as the user not having the correct permissions
upvoted 1 times
...
Teringzooi
2 years, 7 months ago
Selected Answer: C
Answer: C 403 Forbidden: You are authenticated and authorized but do not have the permission to access the resource.
upvoted 1 times
...
designated
2 years, 8 months ago
Selected Answer: C
C is correct - 403 Forbidden is an unrecoverable error that must be treated as an exception since it will be necessary for the user interaction to fix this issue and will not be recovered if we simply try again.
upvoted 2 times
...
ferock
3 years ago
Selected Answer: C
403 Forbidden: You are authenticated and authorized but do not have the permission to access the resource.
upvoted 2 times
...
__al__
3 years, 1 month ago
C... absolutely
upvoted 2 times
...
python_tamer
3 years, 3 months ago
Selected Answer: C
I agree. C is correct. It's an authorization issue.
upvoted 4 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