@jetbrains/ring-ui 6.0.31 → 6.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,6 @@
1
1
  import ExtendableError from 'es6-error';
2
2
  export declare const defaultFetchConfig: RequestInit;
3
- export interface HTTPErrorData {
4
- error?: string;
5
- }
3
+ export type HTTPErrorData = Record<string, unknown>;
6
4
  export declare class HTTPError extends ExtendableError {
7
5
  data: HTTPErrorData;
8
6
  status: number | undefined;
@@ -147,7 +147,7 @@ export default class HTTP {
147
147
  if (!(error instanceof HTTPError)) {
148
148
  throw error;
149
149
  }
150
- const shouldRefreshToken = error.data.error !== undefined
150
+ const shouldRefreshToken = typeof error.data.error === 'string'
151
151
  ? this.shouldRefreshToken?.(error.data.error)
152
152
  : false;
153
153
  if (shouldRefreshToken) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetbrains/ring-ui",
3
- "version": "6.0.31",
3
+ "version": "6.0.32",
4
4
  "description": "JetBrains UI library",
5
5
  "author": "JetBrains",
6
6
  "license": "Apache-2.0",