Prevent error in error handling when responseType is changed