Unauthorized Requests
See original GitHub issueI’m using angular-datatables with server-side processing and Angular http
interceptors to handle session expiring. It works with the requests made to the API normally, but the requests made by Datatables are not intercepted, and I just can’t get any information from the server saying that the user has to log in again.
Instead, jQuery logs on the console a 401 error, but Angular does not catch it, and the application gets broken.
Any idea here? I think that a lot of people can have the same trouble, regarding that we use Angular with an API providing the data.
Issue Analytics
- State:
- Created 8 years ago
- Comments:9 (1 by maintainers)
Top Results From Across the Web
How to deal with 401 (unauthorised) in python requests
What I want to do is GET from a site and if that request returns a 401, then redo my authentication wiggle (which...
Read more >How to Fix a 401 Unauthorized Error? - GeeksforGeeks
The 401 Unauthorized Error is an HTTP status code error that represented the request sent by the client to the server that lacks...
Read more >401 Error: 5 Ways to Troubleshoot and Fix It - Hostinger
The 401 Unauthorized error is triggered by unauthenticated requests made to a WordPress web server. Learn how to identify and fix the issue....
Read more >How to Quickly Fix the 401 Unauthorized Error (5 Methods)
The 401 (Unauthorized) status code indicates that the request has not been applied because it lacks valid authentication credentials for the ...
Read more >401 Unauthorized Error: What It Is and How to Fix It
The 401 Unauthorized Error is an HTTP response status code indicating that the client could not authenticate a request.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I managed to solve this issue including the token inside the authorization header and adding an error function to be called if the request fails.
Please let me know if this also works for you.
I’m having the exact same trouble and I want to skip the error handling of Datatables when status code is 401. How to do it?