Skip to content

Add request timeouts and context propagation for outbound calls#2

Open
embers1algebra wants to merge 1 commit intomasterfrom
embers1algebra-patch-2
Open

Add request timeouts and context propagation for outbound calls#2
embers1algebra wants to merge 1 commit intomasterfrom
embers1algebra-patch-2

Conversation

@embers1algebra
Copy link
Copy Markdown
Owner

Description

What was changed

Introduced a small helper to create an http.Client with sane timeouts and updated outbound request paths to accept context.Context so calls can be cancelled (shutdown, deadlines, etc.).

Why it was changed

Long or hanging outbound calls can block the service and make shutdown unreliable. Timeouts + context propagation improve stability and prevent resource leaks.

How to test

  1. Run the service normally and confirm existing behavior is unchanged.
  2. Point an outbound dependency to a non-responsive endpoint (or block it).
  3. Confirm calls fail within the configured timeout and the service remains responsive.

Pull Request Template

Fixes Issue

Fixes #

Changes proposed

Screenshots (Optional)

Note to reviewers

## Description
### What was changed
Introduced a small helper to create an `http.Client` with sane timeouts and updated outbound request paths to accept `context.Context` so calls can be cancelled (shutdown, deadlines, etc.).

### Why it was changed
Long or hanging outbound calls can block the service and make shutdown unreliable. Timeouts + context propagation improve stability and prevent resource leaks.

### How to test
1. Run the service normally and confirm existing behavior is unchanged.
2. Point an outbound dependency to a non-responsive endpoint (or block it).
3. Confirm calls fail within the configured timeout and the service remains responsive.
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.

1 participant