web: make most client/network errors ignored by sentry
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import { LitElement, html, customElement, property, TemplateResult } from "lit-element";
|
||||
import { SentryIgnoredError } from "../../common/errors";
|
||||
|
||||
enum ResponseType {
|
||||
redirect = "redirect",
|
||||
@ -30,7 +31,7 @@ export class FlowShellCard extends LitElement {
|
||||
// Fallback when the flow does not exist, just redirect to the root
|
||||
window.location.pathname = "/";
|
||||
} else if (!r.ok) {
|
||||
throw Error(r.statusText);
|
||||
throw new SentryIgnoredError(r.statusText);
|
||||
}
|
||||
return r;
|
||||
})
|
||||
|
||||
@ -8,6 +8,7 @@ import BackdropStyle from "@patternfly/patternfly/components/Backdrop/backdrop.c
|
||||
import { SpinnerSize } from "../../elements/Spinner";
|
||||
import { showMessage } from "../../elements/messages/MessageContainer";
|
||||
import { gettext } from "django";
|
||||
import { SentryIgnoredError } from "../../common/errors";
|
||||
|
||||
@customElement("ak-site-shell")
|
||||
export class SiteShell extends LitElement {
|
||||
@ -70,7 +71,7 @@ export class SiteShell extends LitElement {
|
||||
level_tag: "error",
|
||||
message: gettext(`Request failed: ${r.statusText}`),
|
||||
});
|
||||
throw new Error("Request failed");
|
||||
throw new SentryIgnoredError("Request failed");
|
||||
})
|
||||
.then((r) => r.text())
|
||||
.then((t) => {
|
||||
|
||||
Reference in New Issue
Block a user