@fluxomni/api-client 0.12.0 → 0.13.0
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.
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +4 -1
- package/dist/errors.js.map +1 -1
- package/dist/generated/graphql.d.ts +214 -4
- package/dist/generated/graphql.d.ts.map +1 -1
- package/dist/generated/graphql.js +357 -0
- package/dist/generated/graphql.js.map +1 -1
- package/package.json +1 -1
- package/src/errors.ts +6 -2
- package/src/generated/graphql.ts +575 -4
package/package.json
CHANGED
package/src/errors.ts
CHANGED
|
@@ -34,7 +34,10 @@ const VALIDATION_CODE_EXACT = new Set([
|
|
|
34
34
|
'WRONG_ARRAY_INDEX',
|
|
35
35
|
]);
|
|
36
36
|
const PERSISTENCE_CODE_PARTS = ['PERSIST', 'STORAGE', 'DATABASE'];
|
|
37
|
-
const RUNTIME_UNAVAILABLE_CODE_PARTS = [
|
|
37
|
+
const RUNTIME_UNAVAILABLE_CODE_PARTS = [
|
|
38
|
+
'RUNTIME_STATE_UNAVAILABLE',
|
|
39
|
+
'UNAVAILABLE',
|
|
40
|
+
];
|
|
38
41
|
const OPERATION_REJECTED_CODE_PARTS = ['REJECTED', 'STALE_ASSIGNMENT'];
|
|
39
42
|
|
|
40
43
|
/**
|
|
@@ -63,7 +66,8 @@ export function classifyGraphQLError(
|
|
|
63
66
|
if (code === 'UNAUTHORIZED') return 'unauthenticated';
|
|
64
67
|
if (code === 'FORBIDDEN') return 'forbidden';
|
|
65
68
|
if (code.endsWith('_NOT_FOUND') || code === 'NOT_FOUND') return 'not_found';
|
|
66
|
-
if (code.includes('CONFLICT') || code.includes('DUPLICATE'))
|
|
69
|
+
if (code.includes('CONFLICT') || code.includes('DUPLICATE'))
|
|
70
|
+
return 'conflict';
|
|
67
71
|
if (
|
|
68
72
|
VALIDATION_CODE_EXACT.has(code) ||
|
|
69
73
|
VALIDATION_CODE_PREFIXES.some((prefix) => code.startsWith(prefix)) ||
|