Upgraded dependencies, bumped to Node 24.
This commit is contained in:
14
src/api.js
14
src/api.js
@@ -1,4 +1,4 @@
|
||||
import { parse } from '@brillout/json-serializer/parse'; /* eslint-disable-line import/extensions */
|
||||
import { parse } from '@brillout/json-serializer/parse';
|
||||
import events from '#/src/events.js';
|
||||
|
||||
const postHeaders = {
|
||||
@@ -69,7 +69,8 @@ export async function get(path, query = {}, options = {}) {
|
||||
|
||||
showFeedback(false, options, body.statusMessage);
|
||||
throw new Error(body.statusMessage);
|
||||
} catch (error) {
|
||||
}
|
||||
catch (error) {
|
||||
showFeedback(false, options, error.message);
|
||||
throw error;
|
||||
}
|
||||
@@ -97,7 +98,8 @@ export async function post(path, data, options = {}) {
|
||||
|
||||
showFeedback(false, options, body.statusMessage);
|
||||
throw new Error(body.statusMessage);
|
||||
} catch (error) {
|
||||
}
|
||||
catch (error) {
|
||||
showFeedback(false, options, error.message);
|
||||
throw error;
|
||||
}
|
||||
@@ -125,7 +127,8 @@ export async function patch(path, data, options = {}) {
|
||||
|
||||
showFeedback(false, options, body.statusMessage);
|
||||
throw new Error(body.statusMessage);
|
||||
} catch (error) {
|
||||
}
|
||||
catch (error) {
|
||||
showFeedback(false, options, error.message);
|
||||
throw error;
|
||||
}
|
||||
@@ -153,7 +156,8 @@ export async function del(path, options = {}) {
|
||||
|
||||
showFeedback(false, options, body.statusMessage);
|
||||
throw new Error(body.statusMessage);
|
||||
} catch (error) {
|
||||
}
|
||||
catch (error) {
|
||||
showFeedback(false, options, error.message);
|
||||
throw error;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user