Added response code formatting to exception