Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HttpErrorResponse statusText always default to 'OK' for any statusCode #7

Open
sanju1465 opened this issue Jan 6, 2021 · 10 comments
Open

Comments

@sanju1465
Copy link

For any HttpErrorResponse statusCode ( 400, 401, 500, 404 ) angular returning status text always 'OK'
but in postman returning correct status text.

@Zercerium
Copy link

it's the default angular behaviour. For more information angular/angular#23334

@hima193
Copy link

hima193 commented Apr 22, 2021

same issue here. and i tried everything and nothing works

@realshoaib
Copy link

'm having same issue. help!

@EJamotte
Copy link

Same issue here, can't find the right solution

@realshoaib
Copy link

realshoaib commented Aug 21, 2021 via email

@ddecoste
Copy link

ddecoste commented Mar 6, 2022

I do not have this issue, but my business partner does. He is working on a Win10 machine and I am on a M1Pro Macbook. Not sure if it matters, or if it's just a coincidence, but what OS are you running?

@tomicluka24
Copy link

Are there any updates? I'm having the same problem..

@ranjahmed
Copy link

I have same problem in windows 10

@Moundier
Copy link

I'm having the same problem. In principle the operating system should not matter at this point. I use arch linux btw on a Intel architecture iMac. Also, i had to check on about proxy configuration and same result was thrown.

@Moundier
Copy link

I've found a workaround. Since it is the default angular behavior as mentioned by @Zercerium, to prevent wrong HttpErrorResponse's attribute values, what I do is to create a Dto in my backend that matches the angular object HttpErrorResponse, and I provide the custom attributes to be sent to client side. That way I can get the desired status and so on values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants