Skip to content

How to retry SocketTimeoutException? #3074

@almson

Description

@almson

This is a rhetorical question. Feign hard-codes which exceptions it considers retryable, and IOExceptions are never retried. Which is incredibly stupid, because I/O exceptions are the main reason to retry network requests! Additionally, IOExceptions are never sent to the errorDecoder and there's almost nothing that can be done to retry them.

Feign seems so nice, but it's poorly thought through. I've had to rewrite half the classes to fix various major annoyances and oversights. Other examples include the logger class splitting each request/response over many log messages (ignoring the various ways logs are shipped and stored), the jackson decoder trying to decode byte[] and String (making it unusable as a default decoder), and now this. Btw, I worked around this issue via a custom decoder that catches IOExceptions, but this likely isn't a complete solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions