Fixed exception caused by comparing a float to NaN. See comment
in code for details.
Include the response body when raising an exception after an
ActionKit API call failure.