mirror of
https://github.com/strapi/strapi.git
synced 2025-09-08 16:16:21 +00:00
Add event to detect content type creation fail
This commit is contained in:
parent
1091b218c2
commit
f6824b5b04
@ -86,6 +86,7 @@ module.exports = {
|
|||||||
|
|
||||||
strapi.reload();
|
strapi.reload();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
strapi.emit('didNotCreateContentType', e);
|
||||||
return ctx.badRequest(null, [{ messages: [{ id: 'request.error.model.write' }] }]);
|
return ctx.badRequest(null, [{ messages: [{ id: 'request.error.model.write' }] }]);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user