You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
message: "You are not authorized to access this resource",
41
+
},
42
+
[TRPC_ERROR_CODE.FORBIDDEN]: {
43
+
statusCode: 403,
44
+
message: "You don't have necessary permissions to access this resource",
45
+
},
46
+
[TRPC_ERROR_CODE.NOT_FOUND]: {
47
+
statusCode: 404,
48
+
message: "The requested resource was not found",
49
+
},
50
+
[TRPC_ERROR_CODE.INTERNAL_SERVER_ERROR]: {
51
+
statusCode: 500,
52
+
message: "An unexpected error occurred on the server. Please try again later",
53
+
},
54
+
[TRPC_ERROR_CODE.BAD_REQUEST]: {
55
+
statusCode: 400,
56
+
message: "Bad request: Please check your request data and try again",
57
+
},
58
+
[TRPC_ERROR_CODE.CONFLICT]: {
59
+
statusCode: 409,
60
+
message: "Could not process the request due to a resource conflict with the current state",
61
+
},
62
+
[TRPC_ERROR_CODE.TOO_MANY_REQUESTS]: {
63
+
statusCode: 429,
64
+
message: "You have exceeded the allowed number of requests",
65
+
},
66
+
[TRPC_ERROR_CODE.PAYLOAD_TOO_LARGE]: {
67
+
statusCode: 413,
68
+
message: "The request payload is too large",
69
+
},
70
+
[TRPC_ERROR_CODE.CLIENT_CLOSED_REQUEST]: {
71
+
statusCode: 499,
72
+
message: "The client closed the connection before the server could finish processing the request",
73
+
},
74
+
[TRPC_ERROR_CODE.METHOD_NOT_SUPPORTED]: {
75
+
statusCode: 405,
76
+
message: "The requested method is not supported for this resource",
77
+
},
78
+
[TRPC_ERROR_CODE.NOT_IMPLEMENTED]: {
79
+
statusCode: 501,
80
+
message: "The requested method is not implemented on the server",
81
+
},
82
+
[TRPC_ERROR_CODE.PRECONDITION_FAILED]: {
83
+
statusCode: 412,
84
+
message: "The server does not meet one of the preconditions that the requester put on the request",
85
+
},
86
+
[TRPC_ERROR_CODE.TIMEOUT]: {
87
+
statusCode: 408,
88
+
message: "The request took too long to complete. Please try again later",
89
+
},
90
+
[TRPC_ERROR_CODE.UNPROCESSABLE_CONTENT]: {
91
+
statusCode: 422,
92
+
message:
93
+
"The server was unable to process the request because the request payload is semantically incorrect or because the request is syntactically incorrect",
94
+
},
95
+
[TRPC_ERROR_CODE.PARSE_ERROR]: {
96
+
statusCode: 400,
97
+
message: "The request could not be parsed due to invalid syntax.",
errorMessage="You are not authorized to access this resource";
25
-
break;
26
-
case"FORBIDDEN":
27
-
statusCode=403;
28
-
errorMessage="You don't have necessary permissions to access this resource";
29
-
break;
30
-
case"NOT_FOUND":
31
-
statusCode=404;
32
-
errorMessage="The requested resource was not found";
33
-
break;
34
-
case"INTERNAL_SERVER_ERROR":
35
-
statusCode=500;
36
-
errorMessage="An unexpected error occurred on the server. Please try again later";
37
-
break;
38
-
case"BAD_REQUEST":
39
-
statusCode=400;
40
-
errorMessage="Bad request: Please check your request data and try again";
41
-
break;
42
-
case"CONFLICT":
43
-
statusCode=409;
44
-
errorMessage="Could not process the request due to a resource conflict with the current state";
45
-
break;
46
-
case"TOO_MANY_REQUESTS":
47
-
statusCode=429;
48
-
errorMessage="You have exceeded the allowed number of requests";
49
-
break;
50
-
case"PAYLOAD_TOO_LARGE":
51
-
statusCode=413;
52
-
errorMessage="The request payload is too large";
53
-
break;
54
-
case"CLIENT_CLOSED_REQUEST":
55
-
statusCode=499;
56
-
errorMessage=
57
-
"The client closed the connection before the server could finish processing the request";
58
-
break;
59
-
case"METHOD_NOT_SUPPORTED":
60
-
statusCode=405;
61
-
errorMessage="The requested method is not supported for this resource";
62
-
case"NOT_IMPLEMENTED":
63
-
statusCode=501;
64
-
errorMessage="The requested method is not implemented on the server";
65
-
break;
66
-
case"PRECONDITION_FAILED":
67
-
statusCode=412;
68
-
errorMessage=
69
-
"The server does not meet one of the preconditions that the requester put on the request";
70
-
break;
71
-
case"TIMEOUT":
72
-
statusCode=408;
73
-
errorMessage="The request took too long to complete. Please try again later";
74
-
break;
75
-
case"UNPROCESSABLE_CONTENT":
76
-
statusCode=422;
77
-
errorMessage=
78
-
"The server was unable to process the request because the request payload is semantically incorrect or because the request is syntactically incorrect";
79
-
break;
80
-
case"PARSE_ERROR":
81
-
statusCode=400;
82
-
errorMessage="The request could not be parsed due to invalid syntax.";
0 commit comments