mirror of
https://github.com/strapi/strapi.git
synced 2025-09-27 09:25:46 +00:00
Fix force 404
This commit is contained in:
parent
c8a8f0f7ff
commit
7396bc21bd
@ -50,9 +50,10 @@ module.exports = async function(ctx, next) {
|
|||||||
: Boom.wrap(error, ctx.status, ctx.body || error.message);
|
: Boom.wrap(error, ctx.status, ctx.body || error.message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log(ctx.body, ctx.status);
|
||||||
// Empty body is considered as `notFound` response.
|
// Empty body is considered as `notFound` response.
|
||||||
if (_.isUndefined(ctx.body) && _.isUndefined(ctx.status)) {
|
if (_.isUndefined(ctx.body) && _.isUndefined(ctx.status)) {
|
||||||
return ctx.notFound();
|
ctx.notFound();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_.isObject(ctx.body)) {
|
if (_.isObject(ctx.body)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user