undici-types 7.2.0 → 7.2.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.
Files changed (2) hide show
  1. package/errors.d.ts +16 -0
  2. package/package.json +1 -1
package/errors.d.ts CHANGED
@@ -33,6 +33,22 @@ declare namespace Errors {
33
33
  code: 'UND_ERR_BODY_TIMEOUT'
34
34
  }
35
35
 
36
+ export class ResponseError extends UndiciError {
37
+ constructor (
38
+ message: string,
39
+ code: number,
40
+ options: {
41
+ headers?: IncomingHttpHeaders | string[] | null,
42
+ body?: null | Record<string, any> | string
43
+ }
44
+ )
45
+ name: 'ResponseError'
46
+ code: 'UND_ERR_RESPONSE'
47
+ statusCode: number
48
+ body: null | Record<string, any> | string
49
+ headers: IncomingHttpHeaders | string[] | null
50
+ }
51
+
36
52
  export class ResponseStatusCodeError extends UndiciError {
37
53
  constructor (
38
54
  message?: string,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "undici-types",
3
- "version": "7.2.0",
3
+ "version": "7.2.1",
4
4
  "description": "A stand-alone types package for Undici",
5
5
  "homepage": "https://undici.nodejs.org",
6
6
  "bugs": {