@nxtedition/lib 19.4.1 → 19.4.2
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/couch.js +4 -1
- package/package.json +1 -1
package/couch.js
CHANGED
|
@@ -952,7 +952,10 @@ class ErrorHandler extends undici.DecoratorHandler {
|
|
|
952
952
|
|
|
953
953
|
this.#error = new Error(statusText ?? statusCode)
|
|
954
954
|
|
|
955
|
-
this.#contentType =
|
|
955
|
+
this.#contentType = this.#headers['content-type']
|
|
956
|
+
? parseContentType(this.#headers['content-type'] ?? '')?.type
|
|
957
|
+
: null
|
|
958
|
+
|
|
956
959
|
if (this.#contentType !== 'application/json' && this.#contentType !== 'plain/text') {
|
|
957
960
|
throw this.#error
|
|
958
961
|
}
|