[Raji] Made content-type configurable and prettified the errors that get displayed