@hashrytech/quick-components-kit 0.12.6 → 0.12.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/modules/api-client.d.ts +1 -1
- package/dist/modules/api-client.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ProblemDetail } from "./problem-details";
|
|
1
|
+
import { type ProblemDetail } from "./problem-details.js";
|
|
2
2
|
/**
|
|
3
3
|
* @file This module defines a generic REST API client for SvelteKit applications.
|
|
4
4
|
* It provides methods for standard HTTP operations (GET, POST, PUT, PATCH, DELETE),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/lib/api/client.ts
|
|
2
|
-
import { getProblemDetail } from "./problem-details";
|
|
2
|
+
import { getProblemDetail } from "./problem-details.js";
|
|
3
3
|
/**
|
|
4
4
|
* Custom error class for API responses.
|
|
5
5
|
* Provides access to the HTTP status code.
|
|
@@ -234,7 +234,7 @@ export class ApiClient {
|
|
|
234
234
|
const isApiError = error instanceof ApiError;
|
|
235
235
|
const status = isApiError ? error.status : 503; // // Service Unavailable fallback
|
|
236
236
|
const message = error instanceof Error ? error.message : 'Unexpected error occurred';
|
|
237
|
-
const errorObj = getProblemDetail({ status, title: "Server fetch error", type: "/exceptions/fetch-error/", detail: "Error fetching data from API",
|
|
237
|
+
const errorObj = getProblemDetail({ status, title: "Server fetch error", type: "/exceptions/fetch-error/", detail: "Error fetching data from API", server: message });
|
|
238
238
|
return {
|
|
239
239
|
ok: false,
|
|
240
240
|
status,
|