pandastream/panda_client_nodejs — pull request #1 by nathanpeck (2013-05-22 01:18:08+00:00)
Title: Fix for a fatal exception thrown when the PandaStream API returns an HTML body instead of a parseable JSON body.

Occasionally the API will respond with HTML content instead of valid JSON content. This was causing an exception within the client code. This patch catches the exception and retries the request if the last attempt failed.

Major caveats of this patch include the fact that it retries the request instantly instead of waiting. Additionally there is no cutoff, so in cases where the PandaStream API has gone offline or is broken it will just sit there querying the PandaStream API repeatedly instead of using a proper backoff technique followed by eventually reporting a service error back to the use of the client.