Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
`.ajax()` documentation unclear about expectations/data type for `errorThrown` #1113
Comments
|
I agree we should be consistent and clear about the parameter type for the third argument. |
Migrated from jQuery repo: jquery/jquery#4211
Description
There is a seeming contradiction in the documentation for
$.ajax().The docs for the
errorsetting of this function indicate:But later the same docs indicate:
In addition, the docs indicate that the type of the parameter is
String. But, based on the first sentence, it sounds like it can be either an object or a string; which is it?Separately, it appears that the
errorThrownwill always be an empty string for HTTP errors that occur when using HTTP/2 (aka H2). This appears to be becausestatusTextis always an empty string for an HTTP/2 request (more info: https://stackoverflow.com/questions/41632077/why-is-the-statustext-of-my-xhr-empty).I'd love it for the jQuery team to weigh-in on both of these limitations in the current docs.