Skip to content

Commit 5896fc4

Browse files
committed
Revert ":recycle: move IntegrationErrorTypes to clinq-types"
This reverts commit c6da88c.
1 parent 5ddc483 commit 5896fc4

File tree

5 files changed

+21
-17
lines changed

5 files changed

+21
-17
lines changed

.npmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

package-lock.json

Lines changed: 0 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
"typescript": "4.9.5"
6464
},
6565
"dependencies": {
66-
"@sipgate/clinq-types": "^0.67.9",
6766
"ajv": "^8.11.0",
6867
"awesome-phonenumber": "^3.2.0",
6968
"axios": "^0.27.2",
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
export enum IntegrationErrorType {
2+
INTEGRATION_INVALID_URL = "integration/invalid-url",
3+
4+
// TODO: rename to INTEGRATION_ERROR_REFRESH = "integration/error/refresh"
5+
INTEGRATION_REFRESH_ERROR = "integration/refresh-error",
6+
INTEGRATION_ERROR_FORBIDDEN = "integration/error/forbidden",
7+
INTEGRATION_ERROR_UNAVAILABLE = "integration/error/unavailable",
8+
9+
ENTITY_ERROR_CONFLICT = "entity/error/conflict",
10+
ENTITY_NOT_FOUND = "entity/not-found",
11+
12+
CONTACT_CREATE_ERROR_CONFLICT = "contact/create-error/conflict",
13+
CONTACT_CREATE_ERROR_EMAIL_CONFLICT = "contact/create-error/email-conflict",
14+
CONTACT_ERROR_TOO_MANY_NUMBERS = "contact/error/too-many-numbers",
15+
CONTACT_ERROR_INVALID_PHONE_TYPE = "contact/error/invalid-phone-type",
16+
}
17+
18+
export const DELEGATE_TO_FRONTEND_CODE = 452;

src/util/error.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import axios, { AxiosError } from "axios";
2-
import { ServerError } from "../models";
3-
import { errorLogger } from "./logger.util";
42
import {
53
DELEGATE_TO_FRONTEND_CODE,
64
IntegrationErrorType,
7-
} from "@sipgate/clinq-types";
5+
ServerError,
6+
} from "../models";
7+
import { errorLogger } from "./logger.util";
88

99
export const throwAndDelegateError = (
1010
error: AxiosError | ServerError | Error,

0 commit comments

Comments
 (0)