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/21_formdata.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/21_formdata.js')
-rw-r--r-- | ext/fetch/21_formdata.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/fetch/21_formdata.js b/ext/fetch/21_formdata.js index bb33ea2d4..7d466b8e2 100644 --- a/ext/fetch/21_formdata.js +++ b/ext/fetch/21_formdata.js @@ -396,7 +396,9 @@ class MultipartParser { */ constructor(body, boundary) { if (!boundary) { - throw new TypeError("multipart/form-data must provide a boundary"); + throw new TypeError( + "Cannot construct MultipartParser: multipart/form-data must provide a boundary", + ); } this.boundary = `--${boundary}`; @@ -445,7 +447,7 @@ class MultipartParser { ) { return new FormData(); } - throw new TypeError("Unable to parse body as form data."); + throw new TypeError("Unable to parse body as form data"); } const formData = new FormData(); |