# How to customize the error message displayed

**URL:** <https://community.forestadmin.com/t/how-to-customize-the-error-message-displayed/7310>\
**Category:** Help me!\
**Tags:** howtos\
**Created:** [July 6, 2024, 6:56am UTC](https://community.forestadmin.com/t/how-to-customize-the-error-message-displayed/7310 "2024-07-06T06:56:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Quentin\_Somerville1](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/quentin_somerville1/32/7114_2.png) [@Quentin\_Somerville1](https://community.forestadmin.com/u/Quentin_Somerville1)\
**Post date:** [July 6, 2024, 6:56am UTC](https://community.forestadmin.com/t/how-to-customize-the-error-message-displayed/7310/1 "2024-07-06T06:56:35Z")

</div>

## Feature(s) impacted

I’m using the cloud version of forest admin  
I want to override the create function of a collection to call my backend which handle the business logic  
So I called the `collection.overrideCreate` function  
But when my API sends a validation error I can’t display the response in the frontend (see screenshot)

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/8/87ddce1579222327b2ac53ddc73a3b07ae936c95.png)

I tried to throw a `BusinessError` with a custom message from the `@forestadmin/datasource-toolkit` package but I still get the default error message.

I saw that I could use `[customizeErrorMessage](https://docs.forestadmin.com/developer-guide-agents-nodejs/getting-started/install/create-your-agent#customizeerrormessage-function-defaults-to-null)` with self hosted version.  
But I don’t know how to do it with the cloud version because we don’t call `createAgent`

Is it possible to display a custom message ?

## Observed behavior

I get the default message

## Expected behavior

I can customize the error message in overrideCreate function

## Failure Logs

## Context

- Project name: Azybia
- Team name: Azybia
- Environment name: production
- Agent technology: nodejs (cloud)
- Agent (forest package) “@forestadmin/forest-cloud”: “1.9.17”
- Database type: postgres
- Recent changes made on your end if any: N/A

---

<div class="post-metadata">

**Author:** ![Enki](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/enki/32/6004_2.png) [@Enki](https://community.forestadmin.com/u/Enki)\
**Post date:** [July 8, 2024, 3:52pm UTC](https://community.forestadmin.com/t/how-to-customize-the-error-message-displayed/7310/2 "2024-07-08T15:52:08Z")

</div>

Hi @Quentin_Somerville1 ,

Your issue comes from a bug that we identified from your feedback. There seem to be no workaround for now, but we are currently working on the fix. It should be available in the following days. I’ll let you know.

kind regards

---

<div class="post-metadata">

**Author:** ![Enki](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/enki/32/6004_2.png) [@Enki](https://community.forestadmin.com/u/Enki)\
**Post date:** [July 10, 2024, 1:40pm UTC](https://community.forestadmin.com/t/how-to-customize-the-error-message-displayed/7310/3 "2024-07-10T13:40:17Z")

</div>

Hello @Quentin_Somerville1 ,

The fix is live, you should be able to see custom error messages from your agent in your browser.

---

<div class="post-metadata">

**Author:** ![Quentin\_Somerville1](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/quentin_somerville1/32/7114_2.png) [@Quentin\_Somerville1](https://community.forestadmin.com/u/Quentin_Somerville1)\
**Post date:** [July 13, 2024, 7:14am UTC](https://community.forestadmin.com/t/how-to-customize-the-error-message-displayed/7310/4 "2024-07-13T07:14:39Z")

</div>

Thank you @Enki I just tried and it works
