# Certain message cannot be sent in chat

**URL:** https://meta.discourse.org/t/certain-message-cannot-be-sent-in-chat/326762
**Category:** Bug
**Tags:** chat, fixed
**Created:** [September 17, 2024, 12:56am UTC](https://meta.discourse.org/t/certain-message-cannot-be-sent-in-chat/326762 "2024-09-17T00:56:34Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [September 17, 2024, 4:32am UTC](https://meta.discourse.org/t/certain-message-cannot-be-sent-in-chat/326762/2 "2024-09-17T04:32:39Z")

</div>

> [@Firepup650](#):
>
> ```plaintext
> Failed to handle exception in exception app middleware : ActiveRecord::ValueTooLong : PG::StringDataRightTruncation: ERROR: value too long for type character varying(1000)
> 
> ```

It is trying to insert into the chat table and the column is limited to 1000 chars.

Maybe try this in [data explorer](https://meta.discourse.org/t/32566?silent=true):

```plaintext
SELECT 
    column_name, 
    data_type, 
    character_maximum_length
FROM 
    information_schema.columns
WHERE 
    table_name = 'chat_messages'
    AND column_name IN ('cooked', 'message')

```

Is there a max length defined somehow on your schema?

---

_[View the full topic](https://meta.discourse.org/t/certain-message-cannot-be-sent-in-chat/326762)._
