@anzusystems/common-admin 1.47.0-beta.dev-1771894840 → 1.47.0-beta.dev-1771894841

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.
@@ -18839,8 +18839,8 @@ export declare const ANotFoundView: DefineComponent<__VLS_Props_105, {}, {}, {},
18839
18839
  * Custom error class for Axios-related errors
18840
18840
  */
18841
18841
  export declare class AnzuApiAxiosError extends Error {
18842
- cause: AxiosError;
18843
- constructor(cause: AxiosError);
18842
+ cause: AxiosError<any, any>;
18843
+ constructor(cause: AxiosError<any, any>);
18844
18844
  }
18845
18845
 
18846
18846
  export declare class AnzuApiDependencyExistsError extends Error {
package/package.json CHANGED
@@ -20,7 +20,7 @@
20
20
  "./eslint": "./src/eslint/plugin.mjs",
21
21
  "./*": "./*"
22
22
  },
23
- "version": "1.47.0-beta.dev-1771894840",
23
+ "version": "1.47.0-beta.dev-1771894841",
24
24
  "license": "Apache-2.0",
25
25
  "repository": {
26
26
  "type": "git",
@@ -272,6 +272,13 @@ const anzuPlugin = {
272
272
  const hasFatalCheck = parts.some(
273
273
  (part) => part.type === 'CallExpression' && part.callee.name === 'isAnzuFatalError'
274
274
  )
275
+ const hasInstanceofErrorCheck = parts.some(
276
+ (part) =>
277
+ part.type === 'BinaryExpression' &&
278
+ part.operator === 'instanceof' &&
279
+ part.right.type === 'Identifier' &&
280
+ part.right.name === 'Error'
281
+ )
275
282
  const hasAxiosCheck = parts.some(
276
283
  (part) =>
277
284
  part.type === 'CallExpression' &&
@@ -280,11 +287,11 @@ const anzuPlugin = {
280
287
  part.callee.property.name === 'isAxiosError'
281
288
  )
282
289
 
283
- if (hasFatalCheck && hasAxiosCheck) {
290
+ if (hasAxiosCheck && (hasFatalCheck || hasInstanceofErrorCheck)) {
284
291
  context.report({
285
292
  node,
286
293
  message:
287
- 'Replace isAnzuFatalError(error) && axios.isAxiosError(error.cause)' +
294
+ 'Replace error type check && axios.isAxiosError(error.cause)' +
288
295
  ' with isAnzuApiAxiosError(error).' +
289
296
  ' Labs API throws AnzuApiAxiosError with typed AxiosError cause.',
290
297
  })