mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-01-20 22:52:46 -05:00
showing expected content type in errors
This commit is contained in:
parent
64a0ab8be7
commit
9f80a0046e
1 changed files with 1 additions and 1 deletions
|
@ -19,7 +19,7 @@ module.exports.media = function media(expect) {
|
||||||
if (req.headers['content-type'] !== expect) {
|
if (req.headers['content-type'] !== expect) {
|
||||||
next(new UError({
|
next(new UError({
|
||||||
status: 415,
|
status: 415,
|
||||||
msg: 'wrong content-type, we expect '+expect,
|
msg: 'wrong content-type, expect: '+expect+', got: '+req.headers['content-type'],
|
||||||
}));
|
}));
|
||||||
} else {
|
} else {
|
||||||
next();
|
next();
|
||||||
|
|
Loading…
Add table
Reference in a new issue