Releases: belgattitude/httpx
Release list
@httpx/assert@0.1.0
Minor Changes
- #820
b32e907Thanks @belgattitude! - Initial @httpx/assert package
@httpx/json-api@0.5.7
@httpx/exception@2.6.0
Minor Changes
-
#815
77cd15bThanks @belgattitude! - Deprecate the typeHttpStatusCode, useHttpErrorStatusCodeinsteadHttpErrorStatusCode is less ambiguous ad HttpStatusCode could be understood
as HttpStatusCode could represent all http statuses. The type is exported
but there's very few chances an regular user would be impacted. -
#815
77cd15bThanks @belgattitude! - Add new types: HttpErrorStatusCode and HttpErrorStatusCodeOrNumberImproves the typescript experience by allowing typescript to suggest assigned
status codes increateExceptionandHttpException,HttpClientException,
HttpServerExceptionconstructors. Arbitray numbers can still be used. -
#815
77cd15bThanks @belgattitude! - Add new typeguards: isErrorWithErrorStatusCode and isObjectWithErrorStatusCodeThose typeguards can be used in specific circumstances when an originating
error has a statusCode field which indicates by convention the preferred status
to send.import { isErrorWithErrorStatusCode, createHttpException, } from "@httpx/exception"; try { throw new (class extends Error { statusCode = 400; })(); } catch (e) { if (isErrorWithErrorStatusCode(e)) { throw createException(e.statusCode, "Something wrong happened"); } }
const noSuchUser = { statusCode: 404, } satisfies ObjectWithStatusCode; class NoSuchItem extends DomainError implements ObjectWithStatusCode { statusCode: 404; } if (isObjectWithErrorStatusCode(noSuchUser)) { throw createException(e.statusCode, "Nothing"); }
@httpx/json-api@0.5.6
Patch Changes
- #795
ca13c91Thanks @belgattitude! - Fix isPlainObject in edge-runtime
prisma-exception@0.0.1
prisma-exception
@httpx/json-api@0.5.5
Patch Changes
- Updated dependencies [
b004243]:- @httpx/exception@2.5.7
@httpx/json-api@0.5.4
Patch Changes
- Updated dependencies [
39ec1d5]:- @httpx/exception@2.5.6
@httpx/json-api@0.5.3
Patch Changes
- Updated dependencies [
4e2b795]:- @httpx/exception@2.5.5
@httpx/exception@2.5.7
Patch Changes
- #788
b004243Thanks @belgattitude! - Add toc in readme
@httpx/exception@2.5.6
Patch Changes
- #787
39ec1d5Thanks @belgattitude! - Fix README doc links