mirror of
https://github.com/immich-app/immich.git
synced 2025-07-07 09:12:56 +02:00
feat(server): better api error messages (for unhandled exceptions) (#4817)
* feat(server): better error messages * chore: open api * chore: remove debug log * fix: syntax error * fix: e2e test
This commit is contained in:
parent
d4ef6f52bb
commit
2e424fe249
72 changed files with 1974 additions and 1952 deletions
web/src/lib/components/user-settings-page
|
@ -25,14 +25,14 @@
|
|||
};
|
||||
|
||||
async function refreshKeys() {
|
||||
const { data } = await api.keyApi.getKeys();
|
||||
const { data } = await api.keyApi.getApiKeys();
|
||||
keys = data;
|
||||
}
|
||||
|
||||
const handleCreate = async (event: CustomEvent<APIKeyResponseDto>) => {
|
||||
try {
|
||||
const dto = event.detail;
|
||||
const { data } = await api.keyApi.createKey({ aPIKeyCreateDto: dto });
|
||||
const { data } = await api.keyApi.createApiKey({ aPIKeyCreateDto: dto });
|
||||
secret = data.secret;
|
||||
} catch (error) {
|
||||
handleError(error, 'Unable to create a new API Key');
|
||||
|
@ -50,7 +50,7 @@
|
|||
const dto = event.detail;
|
||||
|
||||
try {
|
||||
await api.keyApi.updateKey({ id: editKey.id, aPIKeyUpdateDto: { name: dto.name } });
|
||||
await api.keyApi.updateApiKey({ id: editKey.id, aPIKeyUpdateDto: { name: dto.name } });
|
||||
notificationController.show({
|
||||
message: `Saved API Key`,
|
||||
type: NotificationType.Info,
|
||||
|
@ -69,7 +69,7 @@
|
|||
}
|
||||
|
||||
try {
|
||||
await api.keyApi.deleteKey({ id: deleteKey.id });
|
||||
await api.keyApi.deleteApiKey({ id: deleteKey.id });
|
||||
notificationController.show({
|
||||
message: `Removed API Key: ${deleteKey.name}`,
|
||||
type: NotificationType.Info,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue