# Bounce Processing Inserts Bad Data Type "Reason" - BUG

**URL:** https://forum.mautic.org/t/bounce-processing-inserts-bad-data-type-reason-bug/4688
**Category:** Product Support
**Created:** [July 31, 2016, 2:06pm UTC](https://forum.mautic.org/t/bounce-processing-inserts-bad-data-type-reason-bug/4688 "2016-07-31T14:06:21Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![scatterbrain](https://avatars.discourse-cdn.com/v4/letter/s/9fc29f/32.png) [@scatterbrain](https://forum.mautic.org/u/scatterbrain)
#### Post date: [July 31, 2016, 2:06pm UTC](https://forum.mautic.org/t/bounce-processing-inserts-bad-data-type-reason-bug/4688/1 "2016-07-31T14:06:21Z")

</div>

Hi, I’m new to this software so apologies if it is my fault somehow!  
  
  
  
I’m running the cron job:  
  
**php /var/www/html/mautic/app/console mautic:email:send**  
  
  
  
and it is generating an error of:  
  
**An exception occurred while executing ‘INSERT INTO lead\_donotcontact (date\_added, reason, channel, channel\_id, comments, lead\_id) VALUES (?, ?, ?, ?, ?, ?)’ with params [“2016-07-31 14:49:02”, “bounced”, “email”, 2, “There were more than 3 attempts to send the email.”, 103836]:**  
  
**SQLSTATE[HY000]: General error: 1366 Incorrect integer value: ‘bounced’ for column ‘reason’ at row 1**  
  
  
  
Checking the database I see that the column “Reason” is an Int, yet to accept data like “Bounced” needs to be something like a Varchar.  
  
  
  
I’m tempted to just change “Reason” from Int to VarChar but worried that may have some critical knock on effect.  
  
  
  
What would be your advice?  
  
  
  
Thanks in advance.

---

<div class="post-metadata">

### Author: ![scatterbrain](https://avatars.discourse-cdn.com/v4/letter/s/9fc29f/32.png) [@scatterbrain](https://forum.mautic.org/u/scatterbrain)
#### Post date: [July 31, 2016, 2:06pm UTC](https://forum.mautic.org/t/bounce-processing-inserts-bad-data-type-reason-bug/4688/2 "2016-07-31T14:06:21Z")

</div>

Hi, I’m new to this software so apologies if it is my fault somehow!

I’m running the cron job:  
php /var/www/html/mautic/app/console mautic:email:send

and it is generating an error of:  
An exception occurred while executing ‘INSERT INTO lead\_donotcontact (date\_added, reason, channel, channel\_id, comments, lead\_id) VALUES (?, ?, ?, ?, ?, ?)’ with params [“2016-07-31 14:49:02”, “bounced”, “email”, 2, “There were more than 3 attempts to send the email.”, 103836]:  
SQLSTATE[HY000]: General error: 1366 Incorrect integer value: ‘bounced’ for column ‘reason’ at row 1

Checking the database I see that the column “Reason” is an Int, yet to accept data like “Bounced” needs to be something like a Varchar.

I’m tempted to just change “Reason” from Int to VarChar but worried that may have some critical knock on effect.

What would be your advice?

Thanks in advance.

---

<div class="post-metadata">

### Author: ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)
#### Post date: [August 1, 2016, 10:31am UTC](https://forum.mautic.org/t/bounce-processing-inserts-bad-data-type-reason-bug/4688/3 "2016-08-01T10:31:40Z")

</div>

This is the fix to your issue I believe:

[https://github.com/mautic/mautic/pull/2141](https://github.com/mautic/mautic/pull/2141)

It will be included to Mautic 2.1.0.

---

<div class="post-metadata">

### Author: ![scatterbrain](https://avatars.discourse-cdn.com/v4/letter/s/9fc29f/32.png) [@scatterbrain](https://forum.mautic.org/u/scatterbrain)
#### Post date: [August 1, 2016, 11:58pm UTC](https://forum.mautic.org/t/bounce-processing-inserts-bad-data-type-reason-bug/4688/4 "2016-08-01T23:58:15Z")

</div>

Hi Escopecz, that is definitely the issue. I assume that is a code submission but not part of the current stable distribution…

For the time being I have changed that column to a Varchar(255) and now my database is happily accepting that sql insert.

IS this a bad idea and should I revert it back to an Int?

---

<div class="post-metadata">

### Author: ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)
#### Post date: [August 2, 2016, 5:40am UTC](https://forum.mautic.org/t/bounce-processing-inserts-bad-data-type-reason-bug/4688/5 "2016-08-02T05:40:04Z")

</div>

It will allow you to save the information, but I don’t think the current code is able to work with that. The proper fix is mentioned above. If you’ll be able to test that PR and write a comment bellow it about how the test went, you can even win some prizes this month: [https://www.mautic.org/blog/community/mautic-summer-games/](https://www.mautic.org/blog/community/mautic-summer-games/)
