# Can a HTTP 415 response have body?

**URL:** <https://discuss.jsonapi.org/t/can-a-http-415-response-have-body/233>\
**Category:** Uncategorized\
**Created:** [November 28, 2015, 10:39am UTC](https://discuss.jsonapi.org/t/can-a-http-415-response-have-body/233 "2015-11-28T10:39:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![joneslee85](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.jsonapi.org/joneslee85/32/143_2.png) [@joneslee85](https://discuss.jsonapi.org/u/joneslee85)\
**Post date:** [November 28, 2015, 10:39am UTC](https://discuss.jsonapi.org/t/can-a-http-415-response-have-body/233/1 "2015-11-28T10:39:00Z")

</div>

As of the title, I am curious if responding with a body of a JSON object that includes `errors: []` is spec-compliant.

The spec states that

> Servers MUST respond with a `415 Unsupported Media Type` status code if a request specifies the header `Content-Type: application/vnd.api+json` with any media type parameters.

It does not have any details on the body of the response.

Thanks

---

<div class="post-metadata">

**Author:** ![ethanresnick](https://avatars.discourse-cdn.com/v4/letter/e/45deac/32.png) [@ethanresnick](https://discuss.jsonapi.org/u/ethanresnick)\
**Post date:** [November 29, 2015, 5:30am UTC](https://discuss.jsonapi.org/t/can-a-http-415-response-have-body/233/2 "2015-11-29T05:30:48Z")

</div>

Yeah, responding with `"errors"` in the body should be ok! The spec doesn’t mandate exactly what the error’s title, code, etc. should be, so I think you can fill those in with your own values as appropriate (assuming they comply with the general rules for the meaning of those values).

---

<div class="post-metadata">

**Author:** ![joneslee85](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.jsonapi.org/joneslee85/32/143_2.png) [@joneslee85](https://discuss.jsonapi.org/u/joneslee85)\
**Post date:** [November 30, 2015, 8:54am UTC](https://discuss.jsonapi.org/t/can-a-http-415-response-have-body/233/3 "2015-11-30T08:54:04Z")

</div>

Thanks for the answer.

Moderator can close this topic now
