ruma / homeserver

A Matrix homeserver written in Rust.
https://www.ruma.io/
1.08k stars 41 forks source link

Ensure the response headers for ApiError responses include Content-Type: application/json #128

Closed jstnlef closed 7 years ago

jstnlef commented 7 years ago

This will update the response modifier for ApiError to set the content type to application/json. I also noticed there were quite a few locations using IronError::new(error.clone(), error) to convert ApiErrors to IronErrors even though someone had already implemented the From<ApiError> for IronError trait so I went ahead and updated all of the call sites to use the improved instantiation.

mujx commented 7 years ago

It would be better to create another PR for IronError since they are not related and it would be easier to review.

jstnlef commented 7 years ago

Fair enough.