@rexezuge/errors 1.4.0 → 1.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.
@@ -0,0 +1,22 @@
1
+ import { PayloadTooLargeError } from './PayloadTooLargeError.ts';
2
+ /**
3
+ * 413 for invocations that asked for more work than one Worker invocation can issue.
4
+ *
5
+ * Converged from Edge-Sonic's `SubrequestBudgetExhaustedError`: a scan's index
6
+ * write is resumable (the folder stays on the frontier, so a truncated batch is
7
+ * reported rather than raised), but a play queue is all-or-nothing — half a
8
+ * queue is a shorter queue, which is a wrong answer rather than an unfinished
9
+ * one. Those writes refuse to start rather than starting and stopping.
10
+ *
11
+ * Shares `PayloadTooLarge`'s status (the request is well-formed; only its size
12
+ * exceeds what this plan serves in one invocation) with a distinct `type`,
13
+ * following the `DatabaseError` precedent: the catalog keeps one row per
14
+ * status, and the specialization overrides `type` rather than adding a second
15
+ * 413 row that would break the catalog's unique-status invariant. The remedy is
16
+ * the same shape as `PayloadTooLargeError` — ask for less in one request.
17
+ */
18
+ declare class SubrequestBudgetExhaustedError extends PayloadTooLargeError {
19
+ constructor(message?: string);
20
+ }
21
+ export { SubrequestBudgetExhaustedError };
22
+ //# sourceMappingURL=SubrequestBudgetExhaustedError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SubrequestBudgetExhaustedError.d.ts","sourceRoot":"","sources":["../src/SubrequestBudgetExhaustedError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE;;;;;;;;;;;;;;;GAeG;AACH,cAAM,8BAA+B,SAAQ,oBAAoB;gBACnD,OAAO,CAAC,EAAE,MAAM;CAI7B;AAED,OAAO,EAAE,8BAA8B,EAAE,CAAC"}
@@ -0,0 +1 @@
1
+ import{PayloadTooLargeError as r}from"./PayloadTooLargeError.js";class t extends r{constructor(e){super(e??"This request asks for more database work than one invocation can issue. Send fewer items at once."),this.type="SubrequestBudgetExhausted"}}export{t as SubrequestBudgetExhaustedError};
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/SubrequestBudgetExhaustedError.ts"],
4
+ "sourcesContent": ["import { PayloadTooLargeError } from './PayloadTooLargeError.ts';\n\n/**\n * 413 for invocations that asked for more work than one Worker invocation can issue.\n *\n * Converged from Edge-Sonic's `SubrequestBudgetExhaustedError`: a scan's index\n * write is resumable (the folder stays on the frontier, so a truncated batch is\n * reported rather than raised), but a play queue is all-or-nothing — half a\n * queue is a shorter queue, which is a wrong answer rather than an unfinished\n * one. Those writes refuse to start rather than starting and stopping.\n *\n * Shares `PayloadTooLarge`'s status (the request is well-formed; only its size\n * exceeds what this plan serves in one invocation) with a distinct `type`,\n * following the `DatabaseError` precedent: the catalog keeps one row per\n * status, and the specialization overrides `type` rather than adding a second\n * 413 row that would break the catalog's unique-status invariant. The remedy is\n * the same shape as `PayloadTooLargeError` — ask for less in one request.\n */\nclass SubrequestBudgetExhaustedError extends PayloadTooLargeError {\n constructor(message?: string) {\n super(message ?? 'This request asks for more database work than one invocation can issue. Send fewer items at once.');\n this.type = 'SubrequestBudgetExhausted';\n }\n}\n\nexport { SubrequestBudgetExhaustedError };\n"],
5
+ "mappings": "AAAA,OAAS,wBAAAA,MAA4B,4BAkBrC,MAAMC,UAAuCD,CAAoB,CAC/D,YAAYE,EAAgB,CAC1B,MAAMA,GAAW,mGAAmG,EACpH,KAAK,KAAO,2BACd",
6
+ "names": ["PayloadTooLargeError", "SubrequestBudgetExhaustedError", "message"]
7
+ }
package/dist/index.d.ts CHANGED
@@ -11,6 +11,7 @@ export { MethodNotAllowedError } from './MethodNotAllowedError.ts';
11
11
  export { ConflictError } from './ConflictError.ts';
12
12
  export { PreconditionFailedError } from './PreconditionFailedError.ts';
13
13
  export { PayloadTooLargeError } from './PayloadTooLargeError.ts';
14
+ export { SubrequestBudgetExhaustedError } from './SubrequestBudgetExhaustedError.ts';
14
15
  export { UnsupportedMediaTypeError } from './UnsupportedMediaTypeError.ts';
15
16
  export { RateLimitedError } from './RateLimitedError.ts';
16
17
  export { InternalServerError, DefaultInternalServerError } from './InternalServerError.ts';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,YAAY,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,YAAY,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,E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AE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EACL,iBAAiB,EACjB,4BAA4B,EAC5B,yBAAyB,EACzB,YAAY,EACZ,4BAA4B,EAC5B,yBAAyB,EACzB,cAAc,GACf,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC"}
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{CATALOG as e}from"./CATALOG.js";import{ServiceError as a}from"./ServiceError.js";import{HttpServiceError as E}from"./HttpServiceError.js";import{BadRequestError as f}from"./BadRequestError.js";import{UnauthorizedError as n}from"./UnauthorizedError.js";import{ForbiddenError as i}from"./ForbiddenError.js";import{NotFoundError as b}from"./NotFoundError.js";import{MethodNotAllowedError as u}from"./MethodNotAllowedError.js";import{ConflictError as R}from"./ConflictError.js";import{PreconditionFailedError as c}from"./PreconditionFailedError.js";import{PayloadTooLargeError as S}from"./PayloadTooLargeError.js";import{UnsupportedMediaTypeError as h}from"./UnsupportedMediaTypeError.js";import{RateLimitedError as P}from"./RateLimitedError.js";import{InternalServerError as F,DefaultInternalServerError as I}from"./InternalServerError.js";import{NotImplementedError as U}from"./NotImplementedError.js";import{BadGatewayError as w}from"./BadGatewayError.js";import{ServiceUnavailableError as C}from"./ServiceUnavailableError.js";import{DatabaseError as G}from"./DatabaseError.js";import{NonRetryableError as g,OAuth2TokenNonRetryableError as q,OAuth2TokenRetryableError as z,OutcomeError as H,ProviderApiNonRetryableError as j,ProviderApiRetryableError as J,RetryableError as K}from"./OutcomeError.js";export{w as BadGatewayError,f as BadRequestError,e as CATALOG,R as ConflictError,G as DatabaseError,I as DefaultInternalServerError,i as ForbiddenError,E as HttpServiceError,F as InternalServerError,u as MethodNotAllowedError,g as NonRetryableError,b as NotFoundError,U as NotImplementedError,q as OAuth2TokenNonRetryableError,z as OAuth2TokenRetryableError,H as OutcomeError,S as PayloadTooLargeError,c as PreconditionFailedError,j as ProviderApiNonRetryableError,J as ProviderApiRetryableError,P as RateLimitedError,K as RetryableError,a as ServiceError,C as ServiceUnavailableError,n as UnauthorizedError,h as UnsupportedMediaTypeError};
1
+ import{CATALOG as e}from"./CATALOG.js";import{ServiceError as a}from"./ServiceError.js";import{HttpServiceError as E}from"./HttpServiceError.js";import{BadRequestError as f}from"./BadRequestError.js";import{UnauthorizedError as d}from"./UnauthorizedError.js";import{ForbiddenError as i}from"./ForbiddenError.js";import{NotFoundError as u}from"./NotFoundError.js";import{MethodNotAllowedError as y}from"./MethodNotAllowedError.js";import{ConflictError as R}from"./ConflictError.js";import{PreconditionFailedError as c}from"./PreconditionFailedError.js";import{PayloadTooLargeError as S}from"./PayloadTooLargeError.js";import{SubrequestBudgetExhaustedError as s}from"./SubrequestBudgetExhaustedError.js";import{UnsupportedMediaTypeError as O}from"./UnsupportedMediaTypeError.js";import{RateLimitedError as B}from"./RateLimitedError.js";import{InternalServerError as I,DefaultInternalServerError as L}from"./InternalServerError.js";import{NotImplementedError as g}from"./NotImplementedError.js";import{BadGatewayError as q}from"./BadGatewayError.js";import{ServiceUnavailableError as C}from"./ServiceUnavailableError.js";import{DatabaseError as G}from"./DatabaseError.js";import{NonRetryableError as z,OAuth2TokenNonRetryableError as H,OAuth2TokenRetryableError as j,OutcomeError as J,ProviderApiNonRetryableError as K,ProviderApiRetryableError as Q,RetryableError as V}from"./OutcomeError.js";export{q as BadGatewayError,f as BadRequestError,e as CATALOG,R as ConflictError,G as DatabaseError,L as DefaultInternalServerError,i as ForbiddenError,E as HttpServiceError,I as InternalServerError,y as MethodNotAllowedError,z as NonRetryableError,u as NotFoundError,g as NotImplementedError,H as OAuth2TokenNonRetryableError,j as OAuth2TokenRetryableError,J as OutcomeError,S as PayloadTooLargeError,c as PreconditionFailedError,K as ProviderApiNonRetryableError,Q as ProviderApiRetryableError,B as RateLimitedError,V as RetryableError,a as ServiceError,C as ServiceUnavailableError,s as SubrequestBudgetExhaustedError,d as UnauthorizedError,O as UnsupportedMediaTypeError};
package/dist/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/index.ts"],
4
- "sourcesContent": ["export { CATALOG } from './CATALOG.ts';\nexport type { HttpErrorDefinition, HttpErrorType } from './CATALOG.ts';\nexport { ServiceError } from './ServiceError.ts';\nexport type { ServiceErrorOptions, ErrorHttpPayload } from './ServiceError.ts';\nexport { HttpServiceError } from './HttpServiceError.ts';\nexport { BadRequestError } from './BadRequestError.ts';\nexport { UnauthorizedError } from './UnauthorizedError.ts';\nexport { ForbiddenError } from './ForbiddenError.ts';\nexport { NotFoundError } from './NotFoundError.ts';\nexport { MethodNotAllowedError } from './MethodNotAllowedError.ts';\nexport { ConflictError } from './ConflictError.ts';\nexport { PreconditionFailedError } from './PreconditionFailedError.ts';\nexport { PayloadTooLargeError } from './PayloadTooLargeError.ts';\nexport { UnsupportedMediaTypeError } from './UnsupportedMediaTypeError.ts';\nexport { RateLimitedError } from './RateLimitedError.ts';\nexport { InternalServerError, DefaultInternalServerError } from './InternalServerError.ts';\nexport { NotImplementedError } from './NotImplementedError.ts';\nexport { BadGatewayError } from './BadGatewayError.ts';\nexport { ServiceUnavailableError } from './ServiceUnavailableError.ts';\nexport { DatabaseError } from './DatabaseError.ts';\nexport {\n NonRetryableError,\n OAuth2TokenNonRetryableError,\n OAuth2TokenRetryableError,\n OutcomeError,\n ProviderApiNonRetryableError,\n ProviderApiRetryableError,\n RetryableError,\n} from './OutcomeError.ts';\nexport type { ErrorResponse } from './ErrorResponse.ts';\n"],
5
- "mappings": "AAAA,OAAS,WAAAA,MAAe,eAExB,OAAS,gBAAAC,MAAoB,oBAE7B,OAAS,oBAAAC,MAAwB,wBACjC,OAAS,mBAAAC,MAAuB,uBAChC,OAAS,qBAAAC,MAAyB,yBAClC,OAAS,kBAAAC,MAAsB,sBAC/B,OAAS,iBAAAC,MAAqB,qBAC9B,OAAS,yBAAAC,MAA6B,6BACtC,OAAS,iBAAAC,MAAqB,qBAC9B,OAAS,2BAAAC,MAA+B,+BACxC,OAAS,wBAAAC,MAA4B,4BACrC,OAAS,6BAAAC,MAAiC,iCAC1C,OAAS,oBAAAC,MAAwB,wBACjC,OAAS,uBAAAC,EAAqB,8BAAAC,MAAkC,2BAChE,OAAS,uBAAAC,MAA2B,2BACpC,OAAS,mBAAAC,MAAuB,uBAChC,OAAS,2BAAAC,MAA+B,+BACxC,OAAS,iBAAAC,MAAqB,qBAC9B,OACE,qBAAAC,EACA,gCAAAC,EACA,6BAAAC,EACA,gBAAAC,EACA,gCAAAC,EACA,6BAAAC,EACA,kBAAAC,MACK",
6
- "names": ["CATALOG", "ServiceError", "HttpServiceError", "BadRequestError", "UnauthorizedError", "ForbiddenError", "NotFoundError", "MethodNotAllowedError", "ConflictError", "PreconditionFailedError", "PayloadTooLargeError", "UnsupportedMediaTypeError", "RateLimitedError", "InternalServerError", "DefaultInternalServerError", "NotImplementedError", "BadGatewayError", "ServiceUnavailableError", "DatabaseError", "NonRetryableError", "OAuth2TokenNonRetryableError", "OAuth2TokenRetryableError", "OutcomeError", "ProviderApiNonRetryableError", "ProviderApiRetryableError", "RetryableError"]
4
+ "sourcesContent": ["export { CATALOG } from './CATALOG.ts';\nexport type { HttpErrorDefinition, HttpErrorType } from './CATALOG.ts';\nexport { ServiceError } from './ServiceError.ts';\nexport type { ServiceErrorOptions, ErrorHttpPayload } from './ServiceError.ts';\nexport { HttpServiceError } from './HttpServiceError.ts';\nexport { BadRequestError } from './BadRequestError.ts';\nexport { UnauthorizedError } from './UnauthorizedError.ts';\nexport { ForbiddenError } from './ForbiddenError.ts';\nexport { NotFoundError } from './NotFoundError.ts';\nexport { MethodNotAllowedError } from './MethodNotAllowedError.ts';\nexport { ConflictError } from './ConflictError.ts';\nexport { PreconditionFailedError } from './PreconditionFailedError.ts';\nexport { PayloadTooLargeError } from './PayloadTooLargeError.ts';\nexport { SubrequestBudgetExhaustedError } from './SubrequestBudgetExhaustedError.ts';\nexport { UnsupportedMediaTypeError } from './UnsupportedMediaTypeError.ts';\nexport { RateLimitedError } from './RateLimitedError.ts';\nexport { InternalServerError, DefaultInternalServerError } from './InternalServerError.ts';\nexport { NotImplementedError } from './NotImplementedError.ts';\nexport { BadGatewayError } from './BadGatewayError.ts';\nexport { ServiceUnavailableError } from './ServiceUnavailableError.ts';\nexport { DatabaseError } from './DatabaseError.ts';\nexport {\n NonRetryableError,\n OAuth2TokenNonRetryableError,\n OAuth2TokenRetryableError,\n OutcomeError,\n ProviderApiNonRetryableError,\n ProviderApiRetryableError,\n RetryableError,\n} from './OutcomeError.ts';\nexport type { ErrorResponse } from './ErrorResponse.ts';\n"],
5
+ "mappings": "AAAA,OAAS,WAAAA,MAAe,eAExB,OAAS,gBAAAC,MAAoB,oBAE7B,OAAS,oBAAAC,MAAwB,wBACjC,OAAS,mBAAAC,MAAuB,uBAChC,OAAS,qBAAAC,MAAyB,yBAClC,OAAS,kBAAAC,MAAsB,sBAC/B,OAAS,iBAAAC,MAAqB,qBAC9B,OAAS,yBAAAC,MAA6B,6BACtC,OAAS,iBAAAC,MAAqB,qBAC9B,OAAS,2BAAAC,MAA+B,+BACxC,OAAS,wBAAAC,MAA4B,4BACrC,OAAS,kCAAAC,MAAsC,sCAC/C,OAAS,6BAAAC,MAAiC,iCAC1C,OAAS,oBAAAC,MAAwB,wBACjC,OAAS,uBAAAC,EAAqB,8BAAAC,MAAkC,2BAChE,OAAS,uBAAAC,MAA2B,2BACpC,OAAS,mBAAAC,MAAuB,uBAChC,OAAS,2BAAAC,MAA+B,+BACxC,OAAS,iBAAAC,MAAqB,qBAC9B,OACE,qBAAAC,EACA,gCAAAC,EACA,6BAAAC,EACA,gBAAAC,EACA,gCAAAC,EACA,6BAAAC,EACA,kBAAAC,MACK",
6
+ "names": ["CATALOG", "ServiceError", "HttpServiceError", "BadRequestError", "UnauthorizedError", "ForbiddenError", "NotFoundError", "MethodNotAllowedError", "ConflictError", "PreconditionFailedError", "PayloadTooLargeError", "SubrequestBudgetExhaustedError", "UnsupportedMediaTypeError", "RateLimitedError", "InternalServerError", "DefaultInternalServerError", "NotImplementedError", "BadGatewayError", "ServiceUnavailableError", "DatabaseError", "NonRetryableError", "OAuth2TokenNonRetryableError", "OAuth2TokenRetryableError", "OutcomeError", "ProviderApiNonRetryableError", "ProviderApiRetryableError", "RetryableError"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rexezuge/errors",
3
- "version": "1.4.0",
3
+ "version": "1.5.1",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "repository": {