We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi there!
Here is a simple snippet
this.someService.get(resource_id).pipe( catchError(() => of(1)) ).subscribe((response) => { console.log(response); }, );
In case of server error (e.g. 404 Not Found) there will be at least 2 lines printed
$some not properly built resource where is_loading === true 1
A bit re-worked example
this.someService.get(resource_id).pipe( catchError(() => throwError(1)) ).subscribe((response) => { console.log(response); }, error => { console.log(error); } );
The output is the same 2 lines as above.
So we end up with handling not properly built object wihtout knowing that there was an error! That looks like a bug in the library.
My suggestion is to remove emitting a resource in before error (in case there is any) here https://github.com/reyesoft/ngx-jsonapi/blob/v2.1/src/service.ts#L164-L165
Or at least add something that indicates that there was an error occured.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi there!
Here is a simple snippet
In case of server error (e.g. 404 Not Found) there will be at least 2 lines printed
A bit re-worked example
The output is the same 2 lines as above.
So we end up with handling not properly built object wihtout knowing that there was an error! That looks like a bug in the library.
My suggestion is to remove emitting a resource in before error (in case there is any) here
https://github.com/reyesoft/ngx-jsonapi/blob/v2.1/src/service.ts#L164-L165
Or at least add something that indicates that there was an error occured.
The text was updated successfully, but these errors were encountered: