Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

common error interceptor kills node #668

Open
tom94zoe opened this issue Feb 20, 2019 · 0 comments
Open

common error interceptor kills node #668

tom94zoe opened this issue Feb 20, 2019 · 0 comments

Comments

@tom94zoe
Copy link

Hi,

I have implemented a HttpErrorInterceptor like this https://hackernoon.com/global-http-error-catching-in-angular-4-3-9e15cc1e0a6b.

However, if a server call fails, the error interceptor catches the error, does some action and throws the error again. As a result, the node gets killed, with follow exception.

400 Bad Request
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] serve:ssr: node dist/server.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] serve:ssr script.
npm ERR! This is probably not a problem with npm. There is likely additional logging ou
tput above.

If a doesn't throw the error again, the instead of the "error" block the "success" block within the subscribe was called.

Is there a recommended way to handle http errors with server side rendering?

thank you in advance

@tom94zoe tom94zoe changed the title common Errorinterceptor kills Node common error interceptor kills node Feb 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant