# \[API\] Error 500: The software powering this discussion forum encountered an unexpected problem

**URL:** <https://meta.discourse.org/t/api-error-500-the-software-powering-this-discussion-forum-encountered-an-unexpected-problem/88843>\
**Category:** Product Support\
**Created:** [May 31, 2018, 2:38pm UTC](https://meta.discourse.org/t/api-error-500-the-software-powering-this-discussion-forum-encountered-an-unexpected-problem/88843 "2018-05-31T14:38:42Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)\
**Post date:** [May 31, 2018, 3:06pm UTC](https://meta.discourse.org/t/api-error-500-the-software-powering-this-discussion-forum-encountered-an-unexpected-problem/88843/5 "2018-05-31T15:06:10Z")

</div>

I don’t think it likes your `created_at` value:

````
blake@dev ~/code/discourse_api_sandbox (master) $ ruby new_topics.rb
/home/blake/.rvm/gems/ruby-2.4.2/gems/discourse_api-0.20.0/lib/discourse_api/client.rb:141:in `handle_error': ArgumentError at /posts (DiscourseApi::Error)
=======================

> argument out of range

lib/topic_creator.rb, line 126
------------------------------

``` ruby
  121
  122 @guardian.ensure_can_create!(Topic, category) unless (@opts[:skip_validations] || @opts[:archetype] == Archetype.private_message)
  123
  124 topic_params[:category_id] = category.id if category.present?
  125
> 126 topic_params[:created_at] = Time.zone.parse(@opts[:created_at].to_s) if @opts[:created_at].present?
  127
  128 topic_params[:pinned_at] = Time.zone.parse(@opts[:pinned_at].to_s) if @opts[:pinned_at].present?
  129 topic_params[:pinned_globally] = @opts[:pinned_globally] if @opts[:pinned_globally].present?
  130
  131 if SiteSetting.topic_featured_link_enabled && @opts[:featured_link].present? && @guardian.can_edit_featured_link?(topic_params[:category_id])
```

````

---

_[View the full topic](https://meta.discourse.org/t/api-error-500-the-software-powering-this-discussion-forum-encountered-an-unexpected-problem/88843)._
