changes response status for error