Skip to content

Commit

Permalink
Improved error message formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
NotTimTam committed Sep 13, 2024
1 parent a596806 commit aede09a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion controllers/convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ export const convert = async (req, res) => {
res
.status(400)
.send(
`This conversion module does not support mimetype: "${mimetype}". Supported mimetypes: ${moduleObject.from}`
`This conversion module does not support mimetype: "${mimetype}". Supported mimetypes: ${
moduleObject.from instanceof Array
? `[${moduleObject.from.join(", ")}]`
: moduleObject.from
}`
)
);

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nottimtam/file-converter",
"version": "1.2.12",
"version": "1.2.13",
"description": "A headless, self-hostable, open-source file conversion express middleware.",
"main": "index.js",
"type": "module",
Expand Down

0 comments on commit aede09a

Please sign in to comment.