# Sending a Message fails with 500 error

**URL:** <https://meta.discourse.org/t/sending-a-message-fails-with-500-error/33047>\
**Category:** Bug\
**Created:** [9 Septiembre, 2015 08:46 UTC](https://meta.discourse.org/t/sending-a-message-fails-with-500-error/33047 "2015-09-09T08:46:15Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![mc0e](https://avatars.discourse-cdn.com/v4/letter/m/c77e96/32.png) [@mc0e](https://meta.discourse.org/u/mc0e)\
**Post date:** [9 Septiembre, 2015 08:46 UTC](https://meta.discourse.org/t/sending-a-message-fails-with-500-error/33047/1 "2015-09-09T08:46:15Z")

</div>

When trying to send a message to a particular user (or at least not all users) I’m seeing a 500 error.

In the production log I see:

```
production.log:
Started POST "/posts" for 168.1.6.43 at 2015-09-09 07:35:10 +0000
Processing by PostsController#create as JSON
  Parameters: {"raw"=>"Test junk - McNaughty, and we don't have proper way to get root password, but then decided to walk yet, and then I'll look at it when I have the dimensions of knots and then we should look at logs.", "title"=>"testing", "is_warning"=>"false", "archetype"=>"private_message", "target_usernames"=>"LDC", "typing_duration_msecs"=>"10100", "composer_open_duration_msecs"=>"176608", "nested_post"=>"true"}
Completed 500 Internal Server Error in 142ms (ActiveRecord: 30.6ms)
ArgumentError (comparison of String with 0 failed)
/var/www/discourse/app/models/topic_user.rb:102:in `>='

```

looking at `topic_user.rb`, it appears that the error results from the following resulting in a string value in:

```
      auto_track_after = User.select(:auto_track_topics_after_msecs).find_by(id: user_id).auto_track_topics_after_msecs
      auto_track_after ||= SiteSetting.default_other_auto_track_topics_after_msecs

```

I’m guessing the problem might stem from a non-numeric character in a setting somewhere, but I’m not sure where to look for it. Any suggestions?

If it is the case that a non numeric value can be entered where a numeric one is required, that probably also will want addressing.

---

_[View the full topic](https://meta.discourse.org/t/sending-a-message-fails-with-500-error/33047)._
