# Erro interno do servidor ao definir tags via API

**URL:** <https://meta.discourse.org/t/internal-server-error-setting-tags-via-the-api/100137>\
**Category:** Product Support\
**Created:** [22 Outubro , 2018 06:37 UTC](https://meta.discourse.org/t/internal-server-error-setting-tags-via-the-api/100137 "2018-10-22T06:37:04Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Akki9326](https://avatars.discourse-cdn.com/v4/letter/a/848f3c/32.png) [@Akki9326](https://meta.discourse.org/u/Akki9326)\
**Post date:** [22 Outubro , 2018 10:11 UTC](https://meta.discourse.org/t/internal-server-error-setting-tags-via-the-api/100137/5 "2018-10-22T10:11:15Z")

</div>

Thanks for your replies. But we are also getting 500 error code while creating topic from discourse portal.

```
Started POST "/posts" for 127.0.0.1 at 2018-10-22 10:08:19 +0000
Processing by PostsController#create as JSON
Processing by Presence::PresencesController#publish as */*
Parameters: {"previous"=&gt;""}
Parameters: {"raw"=&gt;"Good post", "title"=&gt;"How does the Membership functionality work", "unlist_topic"=&gt;"false", "category"=&gt;"7", "is_warning"=&gt;"false", "archetype"=&gt;"regular", "typing_duration_msecs"=&gt;"6200", "composer_open_duration_msecs"=&gt;"179956", "shared_draft"=&gt;"false", "nested_post"=&gt;"true"}
Completed 200 OK in 10ms (Views: 0.2ms | ActiveRecord: 3.0ms)
Completed 500 Internal Server Error in 59ms (ActiveRecord: 9.6ms)
NoMethodError (undefined method `&gt;' for nil:NilClass)
/var/www/discourse/lib/topic_creator.rb:161:in `setup_tags'

```

Please help me with this.

---

_[View the full topic](https://meta.discourse.org/t/internal-server-error-setting-tags-via-the-api/100137)._
