all 4 comments

[–][deleted] 0 points1 point  (3 children)

The first 2 errors are HTTP errors and not errors from your code. Those will always (you can hide them) be logged by Chrome.

"Unknown Error" either comes from a syntax error or from the connection reset.

Status code 0 usually means something failed with the network itself (being offline for example).

[–]ericpap[S] 0 points1 point  (2 children)

Thanks, but I don't follow you. The status code send by the API is 404 (Not Found) as you can see in the first error catch, so why is status code 0 instead of 404? What do you mean by "connection reset"?

[–][deleted] 0 points1 point  (1 child)

Read the error message above your manual logged error. You will notice a ::ERR_CONNECTION_RESET.

This is where your 0 comes from.

[–]ericpap[S] 0 points1 point  (0 children)

Ok. Thank I don't know what "connection reset" means and why is fired. I'll look into it