Update tests to use http error codes