Throw Error message in lifecycle hook doesnt change the error message display in the UI

This approach works with Strapi version 4.13.3

throw new utils.errors.ApplicationError(‘Custom error message’);

Upgrade your Strapi version and it’ll start working

Hi @Octavio_Braga, Im using strapi 4.13.3 and still have the issue.
Would you mind sharing your package.json?
Thanks so much!

update: I got this working we the following dependencies:

"dependencies": {
    "@_sh/strapi-plugin-ckeditor": "^2.0.4",
    "@strapi/plugin-users-permissions": "4.15.4",
    "@strapi/plugin-i18n": "4.15.4",
    "@strapi/plugin-cloud": "4.15.4",
    "@strapi/strapi": "4.15.4",
    "@strapi/utils": "^4.15.4",
    "better-sqlite3": "8.6.0",
    "pg": "^8.11.1",
    "react": "^18.0.0",
    "react-dom": "^18.0.0",
    "react-router-dom": "5.3.4",
    "styled-components": "5.3.3",
    "strapi-plugin-content-tags": "^1.0.1",
    "strapi-plugin-import-export-entries": "^1.21.1",
    "tslint": "^6.1.3"