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:
Jason Rasmussen
2023-11-03 21:33:15 -04:00
committed by GitHub
parent d4ef6f52bb
commit 2e424fe249
72 changed files with 1974 additions and 1952 deletions

View File

@@ -82,7 +82,7 @@
};
async function readLibraryList() {
const { data } = await api.libraryApi.getAllForUser();
const { data } = await api.libraryApi.getLibraries();
libraries = data;
dropdownOpen.length = libraries.length;

View File

@@ -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,