Merge response error tests into one function