We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b5455e commit 6e31c87Copy full SHA for 6e31c87
src/error.ts
@@ -38,7 +38,7 @@ export const PluginErrorType = {
38
39
export type IPluginErrorType = (typeof PluginErrorType)[keyof typeof PluginErrorType];
40
41
-const getStatus = (errorType: IPluginErrorType | string) => {
+export const getPluginErrorStatus = (errorType: IPluginErrorType | string) => {
42
switch (errorType) {
43
case PluginErrorType.PluginApiNotFound:
44
case PluginErrorType.PluginMetaNotFound:
@@ -79,7 +79,7 @@ export const createErrorResponse = (
79
body?: string | object,
80
): Response => {
81
// 获取错误类型对应的状态码
82
- const statusCode = getStatus(errorType);
+ const statusCode = getPluginErrorStatus(errorType);
83
84
// 构造错误响应数据
85
const data: ErrorResponse = { body, errorType };
0 commit comments