# How to handle error mapping

**URL:** <https://discuss.elastic.co/t/how-to-handle-error-mapping/273399>\
**Category:** Elasticsearch\
**Created:** [May 19, 2021, 11:49am UTC](https://discuss.elastic.co/t/how-to-handle-error-mapping/273399 "2021-05-19T11:49:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rizky\_Hudha](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rizky_hudha/32/87736_2.png) [@Rizky\_Hudha](https://discuss.elastic.co/u/Rizky_Hudha)\
**Post date:** [May 19, 2021, 11:49am UTC](https://discuss.elastic.co/t/how-to-handle-error-mapping/273399/1 "2021-05-19T11:49:27Z")

</div>

hallo I tried to make a mapping for my needs, but an error appeared, can you help with my error,

and this my mappping

```auto
PUT /badilums
{
    "mappings":{
        "properties":{
            "badilum_perkara":{
                "type":"nested",
                "properties":{
                    "id":{
                        "type":"integer"
                    },
                    "pengadilan _negeri_id":{
                        "type":"integer"
                    },
                    "nomor_perkara":{
                        "type":"text"
                    },
                    "status_perkara":{
                        "type":"text"
                    },
                    "tanggal_pendaftaran":{
                        "type":"text"
                    },
                    "klasifikasi_perkara":{
                        "type":"text"
                    },
                    "para_pihak":{
                        "type":"text"
                    },
                    "tanggal_surat_pelimpahan":{
                        "type":"text"
                    },
                    "nomor_surat_pelimpahan":{
                        "type":"text"
                    },
                    "dakwaan":{
                        "type":"text"
                    },
                    "pihak_dipublikasikan":{
                        "type":"text"
                    },
                    "tanggal_surat":{
                        "type":"text"
                    },
                    "nomor_surat":{
                        "type":"text"
                    },
                    "nilai_sengketa":{
                        "type":"text"
                    },
                    "petitum":{
                        "type":"text"
                    },
                    "prodeo":{
                        "type":"text"
                    },
                    "tanggal_penindakan":{
                        "type":"text"
                    },
                    "ditindak_oleh":{
                        "type":"text"
                    },
                    "nomor_seri_surat_tilang":{
                        "type":"text"
                    },
                    "jenis_surat_tilang":{
                        "type":"text"
                    },
                    "jenis_kendaraan":{
                        "type":"text"
                    },
                    "tanda_nomor_kendaraan":{
                        "type":"text"
                    },
                    "bukti":{
                        "type":"text"
                    },
                    "created_at":{
                        "text":"date",
                        "format":"yyyyMMdd'T'HHmmss.SSSZ"
                    },
                    "update_at":{
                        "text":"date",
                        "format":"yyyyMMdd'T'HHmmss.SSSZ"
                    }
                }
            }
        }
    }
}

and this my error

{
  "error" : {
    "root_cause" : [
      {
        "type" : "mapper_parsing_exception",
        "reason" : "No type specified for field [created_at]"
      }
    ],
    "type" : "mapper_parsing_exception",
    "reason" : "Failed to parse mapping [_doc]: No type specified for field [created_at]",
    "caused_by" : {
      "type" : "mapper_parsing_exception",
      "reason" : "No type specified for field [created_at]"
    }
  },
  "status" : 400
}
```

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [May 19, 2021, 12:02pm UTC](https://discuss.elastic.co/t/how-to-handle-error-mapping/273399/2 "2021-05-19T12:02:15Z")

</div>

> [@Rizky\_Hudha](#):
>
> ```auto
> "created_at":{
> "text":"date",
> "format":"yyyyMMdd'T'HHmmss.SSSZ"
> }
> 
> ```

It says `"text": "date"` here instead of `"type": "date"`. Same for the `update_at` property

---

<div class="post-metadata">

**Author:** ![Rizky\_Hudha](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rizky_hudha/32/87736_2.png) [@Rizky\_Hudha](https://discuss.elastic.co/u/Rizky_Hudha)\
**Post date:** [May 19, 2021, 2:34pm UTC](https://discuss.elastic.co/t/how-to-handle-error-mapping/273399/3 "2021-05-19T14:34:30Z")

</div>

it turns out that I am not careful,  
thanks Joe for the help

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 16, 2021, 2:34pm UTC](https://discuss.elastic.co/t/how-to-handle-error-mapping/273399/4 "2021-06-16T14:34:47Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
