fix(sentry): sentry fix error/build

pull/210/head
Rakov 3 years ago
parent d6112d0db1
commit df1ac5508d
  1. 59854
      package-lock.json
  2. 4
      src/helpers/callApi/logoutIfUnauthorized.tsx

59854
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -5,9 +5,7 @@ export const logoutIfUnauthorized = async (response: Response) => {
const body = await response.json() const body = await response.json()
if (response.status === 400) { if (response.status === 400) {
// OTT api возвращает ошибки вида body.data Sentry.captureException(body)
// statistic api возвращает ошибки вида body.error
Sentry.captureException(body.data || body.error || body.message)
} }
if (response.status === 401 || response.status === 403) { if (response.status === 401 || response.status === 403) {

Loading…
Cancel
Save