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

Bugfix/re throw error in http intercepter #1627

Merged
merged 8 commits into from
Jun 12, 2024

Conversation

danoswaltCL
Copy link
Collaborator

as discussed in some mtg, we should allow this error keep moving through so the error can be caught in angular components

return EMPTY; // returning EMPTY instead of throwError as Error is handled using snacker here itself

// re-throw to allow the error to be caught by the calling code
return throwError(() => new Error(JSON.stringify(err)));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just throw error?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry, what is the code suggestion to try?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok I see just throw err does work, let me fix the tests.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danoswaltCL
Copy link
Collaborator Author

@VivekFitkariwala is this looking right to you now? I'll need this fixed for the demo.

@VivekFitkariwala
Copy link
Collaborator

@danoswaltCL yup approved

@danoswaltCL danoswaltCL merged commit 27d0768 into dev Jun 12, 2024
8 checks passed
@danoswaltCL danoswaltCL deleted the bugfix/re-throw-error-in-http-intercepter branch June 12, 2024 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants