Add event to detect content type creation fail

This commit is contained in:
Aurélien Georget 2019-02-06 16:45:04 +01:00
parent 1091b218c2
commit f6824b5b04

View File

@ -86,6 +86,7 @@ module.exports = {
strapi.reload();
} catch (e) {
strapi.emit('didNotCreateContentType', e);
return ctx.badRequest(null, [{ messages: [{ id: 'request.error.model.write' }] }]);
}
} catch (e) {