Handling Errors
Discover how to handle errors from Strapi. ๐ก
Thanks to Strapi v4, handling errors is no longer a time-consuming task. You now have a well-formatted error object following this structure:
{
data: null,
error: {
status: "", // HTTP status
name: "", // Strapi error name ('ApplicationError' or 'ValidationError')
message: "", // A human readable error message
details: {
// error info specific to the error type
}
}
}
Checkout the Strapi Error handling documentation for more information.