Fix failed assertion when constructing an unprocessable response error for 5xx errors. closes #1169