Editing
Troubleshooting of HTTP errors
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Draft}} HTTP status code {{LanguageSwitcher | content = [[Troubleshooting of HTTP errors | EN]], [[Troubleshooting of HTTP errors in Mandarin | 漢字]] }} __TOC__ == 400 Bad Request == Root cause of 400 Bad Request. HTTP Error 400. The request is badly formed. * "the server cannot or will not process the request due to something that is perceived to be a client error (for example, malformed request syntax, invalid request message framing, or deceptive request routing)" Possible solution: * Modify the request headers == 403 Forbidden Error == See: [[How to fix the 403 forbidden error]] == 404 File Not Found == Solution: Check if the accessed link is correct, see "404 Not Found | Possible solutions for pages not found" == 405 Method Not Allowed Error == Solution: Check if the accessed file or resource supports the HTTP protocol being used. For example, if the resource is restricted to POST requests but you're using GET. == 414 Request-URI Too Large == Solution: Change the request protocol to POST instead of GET == 415 Unsupported Media Type == Solution: "Set the Content-Type or Content-Encoding in the request or direct access to the data." For example: When encountering this error with RESTful API, a possible solution is to add to the HTTP Headers: <pre> Content-Type: application/json </pre> == 429 Too Many Requests == Root Cause: * Accessing website resources or web service API too frequently Solutions: * '''Adjust the delay time''' based on your usage patterns and the service's limits e.g. Increase the delay time between requests (e.g., add a 1-second pause between each request). * If accessing a web service API, Please refer to the documentation to understand the API access rate limits, such as: (1) "Requests Per Minute" (RPM) – the maximum number of API requests you can make per minute, or (2) "Requests Per Day" (RPD) – the maximum number of API requests you can make per day. Check if you can request a higher quota limit from the service provider * '''Implement exponential backoff retry mechanism''': Detect rate limit errors (HTTP 429) in your application. Increase the delay time with each failed retry (e.g., 2 seconds, 4 seconds, 8 seconds). Continue retrying until the request succeeds or maximum retry count is reached. == 502 Bad Gateway == Cause: * Error occurs between network devices, users cannot directly handle it. Solutions: * Bypass browser cache, refresh the page * Try reconnecting after a while == Error 1020: Access Denied == * See link for understanding how to resolve Error 1020 Access Denied to get your website back online <pre> Content-Type: application/json </pre> https://http.cat/200.jpg From HTTP Cats Related websites: * [https://httpstatusdogs.com/ HTTP Status Dogs] == Other possible root causes == * CDN (Content delivery network) == Related pages == * [[Troubleshooting of curl errors]] * [[Test connectivity for the web service]] == References == <references /> {{Template:Troubleshooting}} [[Category: Web server]] [[Category:Programming]] [[Category:Web scraping]]
Summary:
Please note that all contributions to LemonWiki共筆 are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
LemonWiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Draft
(
edit
)
Template:LanguageSwitcher
(
edit
)
Template:Troubleshooting
(
edit
)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Current events
Recent changes
Random page
Help
Categories
Tools
What links here
Related changes
Special pages
Page information