added tests for error response