diff options
author | Ian Bull <irbull@gmail.com> | 2024-09-04 00:05:29 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-04 09:05:29 +0200 |
commit | ce6b6751028bfe08b49628a30e660ff479eded02 (patch) | |
tree | b0262dcbfa8e40aca090486eab959f04ae725ffc /ext/fetch/22_body.js | |
parent | 7079acd74d583a14f3c09e16f196a6851381439b (diff) |
refactor(ext/fetch): align error messages (#25374)
Aligns the error messages in the ext/fetch folder to be in-line with the
Deno style guide.
https://github.com/denoland/deno/issues/25269
Diffstat (limited to 'ext/fetch/22_body.js')
-rw-r--r-- | ext/fetch/22_body.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/fetch/22_body.js b/ext/fetch/22_body.js index 82f41411d..a8f5deac9 100644 --- a/ext/fetch/22_body.js +++ b/ext/fetch/22_body.js @@ -151,7 +151,7 @@ class InnerBody { * @returns {Promise<Uint8Array>} */ consume() { - if (this.unusable()) throw new TypeError("Body already consumed."); + if (this.unusable()) throw new TypeError("Body already consumed"); if ( ObjectPrototypeIsPrototypeOf( ReadableStreamPrototype, @@ -372,7 +372,7 @@ function packageData(bytes, type, mimeType) { const boundary = mimeType.parameters.get("boundary"); if (boundary === null) { throw new TypeError( - "Missing boundary parameter in mime type of multipart formdata.", + "Cannot turn into form data: missing boundary parameter in mime type of multipart form data", ); } return parseFormData(chunkToU8(bytes), boundary); |