You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, the Connect ES library wraps exceptions thrown inside of calls (including interceptors written by users) into ConnectError, with the original error thrown placed into the cause field. Because of this, when you do a redirect call inside of a connect-es interceptor, it doesn't work as expected.
Describe the proposed solution
Since the cause field is now widely supported, it would be very nice if code that checks for Redirect exceptions could also check the chain of causes.
Alternatives considered
An easy-but-cumbersome work-around is to wrap each call to a Connect ES client with a try/catch handler, detect a redirect in the cause and re-throw that. This works today, but it has to be done manually at each RPC call-site, so it is far from ideal.
Connect ES could be changed to not wrap errors thrown in interceptors, or make this behavior configurable. However, the sentiment for this change seems to be poor a few different reasons.
Importance
would make my life easier
Additional Information
No response
The text was updated successfully, but these errors were encountered:
Describe the problem
Right now, the Connect ES library wraps exceptions thrown inside of calls (including interceptors written by users) into
ConnectError
, with the original error thrown placed into thecause
field. Because of this, when you do aredirect
call inside of a connect-es interceptor, it doesn't work as expected.Describe the proposed solution
Since the
cause
field is now widely supported, it would be very nice if code that checks forRedirect
exceptions could also check the chain ofcause
s.Alternatives considered
try
/catch
handler, detect a redirect in thecause
and re-throw that. This works today, but it has to be done manually at each RPC call-site, so it is far from ideal.Importance
would make my life easier
Additional Information
No response
The text was updated successfully, but these errors were encountered: