heimdall icon indicating copy to clipboard operation
heimdall copied to clipboard

Hystrix Client Exit on Hystrix Time-out Error

Open vaguecoder opened this issue 3 years ago • 0 comments

Motivation

Issue #127 reported by @sebastian-popa

Changes

  1. Condition to verify hystrix-timeout error and exit w/o retry. Add unit test to verify the same.
  2. Upgrade version of testify package: v1.3.0 -> v1.7.0 for assert.ErrorIs used by the same unit test.

Summary

Heimdall's hystrix-client once timed out on hystrix-go's client, the subsequent retries fail by throwing error similar to http: ContentLength=24 with Body length 0 as reported in #127. The code on #127 polished and shared at playground link to understand this.

cURL Call:

curl 'http://localhost:8080/proxy' -d'{"message": "anything"}'

Results:

# Before
{"message":"Post \"http://localhost:8080/actual\": http: ContentLength=24 with Body length 0"}

# Now
{"message":"hystrix: timeout"}

Related Issues

Closes #127

vaguecoder avatar Aug 14 '22 15:08 vaguecoder