Worked on exception formatting.
Added santization options and invalid content-type handling.