Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

forward internal errors instead of timeout status codes #263

Merged
merged 1 commit into from
Dec 10, 2023

Conversation

trivalik
Copy link
Contributor

@trivalik trivalik commented Dec 1, 2023

Fixes #236

The only question for me is should we leave the _exception list filled with the exception or can we consume it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you commented, this won't be needed if we use GetPendingException.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should consume the exception. May I suggest:

using (var timeoutCts = new CancellationTokenSource((int)request.RequestHeader!.TimeoutHint))
using (var linkedCts = CancellationTokenSource.CreateLinkedTokenSource(timeoutCts.Token, _channelCts.Token, token))
using (var registration = linkedCts.Token.Register(o => ((ServiceOperation)o!).TrySetException(GetPendingException() ?? new ServiceResultException(StatusCodes.BadRequestTimeout)), operation, false))
{

@awcullen awcullen merged commit 6595ddc into convertersystems:master Dec 10, 2023
1 check failed
@trivalik
Copy link
Contributor Author

@awcullen you missed to remove PeakFirstPendingException()

Is there a release planed?

@trivalik
Copy link
Contributor Author

trivalik commented Jan 2, 2024

@awcullen is there a planned to push a release to nuget.org?

@trivalik trivalik deleted the forwardSecurityError branch May 29, 2024 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BadCertificateIssuerTimeInvalid forwarded as Timeout
2 participants