@hashrytech/quick-components-kit 0.12.4 → 0.12.5

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @hashrytech/quick-components-kit
2
2
 
3
+ ## 0.12.5
4
+
5
+ ### Patch Changes
6
+
7
+ - fix: returning a 503 instead of 0 on fetch failed
8
+
3
9
  ## 0.12.4
4
10
 
5
11
  ### Patch Changes
@@ -1,9 +1,7 @@
1
1
  <script lang="ts" module>
2
- import { onDestroy, onMount, type Snippet } from 'svelte';
3
- import type { ClassNameValue } from 'tailwind-merge';
4
- import { fade } from 'svelte/transition';
2
+ import { type Snippet } from 'svelte';
3
+ import type { ClassNameValue } from 'tailwind-merge';
5
4
  import {twMerge} from 'tailwind-merge';
6
- import { browser } from '$app/environment';
7
5
  import Overlay from '../overlay/Overlay.svelte';
8
6
  import { onKeydown } from '../../actions/on-keydown.js';
9
7
 
@@ -231,7 +231,7 @@ export class ApiClient {
231
231
  catch (error) {
232
232
  await this.handleError(error);
233
233
  const isApiError = error instanceof ApiError;
234
- const status = isApiError ? error.status : 0; // 0 = network error or unknown
234
+ const status = isApiError ? error.status : 503; // // Service Unavailable fallback
235
235
  const message = error instanceof Error ? error.message : 'Unexpected error occurred';
236
236
  return {
237
237
  ok: false,
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/hashrytech/quick-components-kit.git"
7
7
  },
8
- "version": "0.12.4",
8
+ "version": "0.12.5",
9
9
  "license": "MIT",
10
10
  "author": "Hashry Tech",
11
11
  "files": [