@littlebigbrain/client 0.4.3 → 0.5.1

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.
@@ -30,6 +30,8 @@ export declare class LbbError extends Error {
30
30
  readonly param?: string | null;
31
31
  readonly requestId?: string | null;
32
32
  readonly docUrl?: string | null;
33
+ readonly retryable?: boolean;
34
+ readonly retryAfterSeconds?: number;
33
35
  constructor(status: number, body: string, error?: LbbErrorPayload | undefined);
34
36
  }
35
37
  export type QueryValue = string | number | boolean | undefined;
package/dist/transport.js CHANGED
@@ -8,6 +8,8 @@ export class LbbError extends Error {
8
8
  param;
9
9
  requestId;
10
10
  docUrl;
11
+ retryable;
12
+ retryAfterSeconds;
11
13
  constructor(status, body, error) {
12
14
  super(error?.message ?? `Little Big Brain ${status}: ${body}`);
13
15
  this.status = status;
@@ -19,6 +21,8 @@ export class LbbError extends Error {
19
21
  this.param = error?.param;
20
22
  this.requestId = error?.request_id;
21
23
  this.docUrl = error?.doc_url;
24
+ this.retryable = error?.retryable;
25
+ this.retryAfterSeconds = error?.retry_after_seconds;
22
26
  }
23
27
  }
24
28
  export function sleep(ms) {
package/dist/types.d.ts CHANGED
@@ -281,6 +281,8 @@ export interface LbbErrorPayload {
281
281
  param?: string | null;
282
282
  request_id?: string | null;
283
283
  doc_url?: string | null;
284
+ retryable?: boolean;
285
+ retry_after_seconds?: number;
284
286
  }
285
287
  export interface RawLbbResponse<T> {
286
288
  data: T;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@littlebigbrain/client",
3
- "version": "0.4.3",
3
+ "version": "0.5.1",
4
4
  "description": "TypeScript client for the little big brain graph + hybrid search HTTP API",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {