Closed as not planned
Description
- Review the documentation: https://docs.sentry.io/
- Search for existing issues: https://github.com/getsentry/sentry-javascript/issues
- Use the latest release: https://github.com/getsentry/sentry-javascript/releases
- Provide a link to the affected event from your Sentry account
Package + Version
-
@sentry/browser
-
@sentry/node
-
raven-js
-
raven-node
(raven for node) - other:
Version:
5.15.4
Description
My application(Angular@9) throws rxjs.Observable.error()
and catch that by Sentry.captureException();
.
At Sentry.io, I saw
Hub.push../node_modules/@sentry/hub/esm/hub.js.Hub.withScope
error
Non-Error exception captured with keys: ...
https://sentry.io/organizations/{myorg}/issues/1582573825/
It may be better that Sentry.captureException() could be to catch rxjs.Observable.error()
simply.
Or had I mistaken for using @sentry/browser
??
code
import { Component } from "@angular/core";
import { Observable } from "rxjs";
@Component({
selector: "app-root",
template: `<button (click)="myProcess()"></button>`
})
export class AppComponent {
public myProcess(): void {
new Observable<{message: string}>(observer => {
observer.error({message: "my failure..."});
}).subscribe(result => console.log(result));
}
}
@Injectable()
export class SentryErrorHandler implements ErrorHandler {
constructor() {}
handleError(error) {
Sentry.captureException(error.originalError || error);
}
}
Metadata
Metadata
Assignees
Labels
No labels