Http Response Format Fix

fix formatting of bad_request response to be json like all other responses. also added test timeouts