MCPcopy Create free account
hub / github.com/apitable/apitable / i18nMessage

Function i18nMessage

packages/core/src/utils/error_capture.ts:42–52  ·  view source on GitHub ↗
(code: number, message: string)

Source from the content-addressed store, hash-verified

40 writable: true,
41 });
42 const i18nMessage = (code: number, message: string) => {
43 switch (code) {
44 case 50000:
45 return t(Strings.socket_error_server);
46 case 50001:
47 return t(Strings.socket_error_network);
48 case StatusCode.FRONT_VERSION_ERROR:
49 return t(Strings.front_version_error_desc);
50 }
51 return message;
52 };
53
54 const getErrorType = (code: string) => {
55 if ([OVER_LIMIT_PER_SHEET_RECORDS, OVER_LIMIT_SPACE_RECORDS, OVER_LIMIT_GANTT_VIEW_NUMBER, OVER_LIMIT_CALENDAR_NUMBER].includes(code)) {

Callers 1

onErrorFunction · 0.85

Calls 1

tFunction · 0.90

Tested by

no test coverage detected