i18n and UI fix
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
type KintoneApiError,
|
||||
AppCustomizeParameter,
|
||||
} from "@shared/types/kintone";
|
||||
import { getErrorMessage } from "./errors";
|
||||
|
||||
/**
|
||||
* Custom error class for Kintone API errors
|
||||
@@ -63,7 +64,7 @@ export class KintoneClient {
|
||||
return new KintoneError(error.message);
|
||||
}
|
||||
|
||||
return new KintoneError("Unknown error occurred");
|
||||
return new KintoneError(getErrorMessage("unknownError"));
|
||||
}
|
||||
|
||||
private async withErrorHandling<T>(operation: () => Promise<T>): Promise<T> {
|
||||
@@ -198,7 +199,9 @@ export class KintoneClient {
|
||||
return {
|
||||
success: false,
|
||||
error:
|
||||
error instanceof KintoneError ? error.message : "Connection failed",
|
||||
error instanceof KintoneError
|
||||
? error.message
|
||||
: getErrorMessage("connectionFailed"),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user