decodeResponse fails when an error message is not a string