Skip to content

Commit

Permalink
fix: bump relay timeouts (#218)
Browse files Browse the repository at this point in the history
## Motivation

Bump up hub request timeouts to 5 seconds.

## Merge Checklist

_Choose all relevant options below by adding an `x` now or at any time
before submitting for review_

- [x] PR title adheres to the [conventional
commits](https://www.conventionalcommits.org/en/v1.0.0/) standard
- [x] PR has a changeset
- [x] PR has been tagged with a change label(s) (i.e. documentation,
feature, bugfix, or chore)
- [ ] PR includes documentation if necessary
- [x] All commits have been signed
  • Loading branch information
horsefacts authored Sep 17, 2024
1 parent 782c742 commit 41e83c0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/popular-flies-joke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@farcaster/auth-relay": patch
---

fix: bump relay timeouts
4 changes: 2 additions & 2 deletions apps/relay/src/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ export class AddressService {
const url = `${HUB_URL}/v1/verificationsByFid?fid=${fid}`;
const fallbackUrl = `${HUB_FALLBACK_URL}/v1/verificationsByFid?fid=${fid}`;

return ResultAsync.fromPromise(this.http.get<VerificationsAPIResponse>(url, { timeout: 1000 }), (error) => {
return ResultAsync.fromPromise(this.http.get<VerificationsAPIResponse>(url, { timeout: 5000 }), (error) => {
return new RelayError("unknown", error as Error);
})
.orElse(() => {
return ResultAsync.fromPromise(
this.http.get<VerificationsAPIResponse>(fallbackUrl, {
timeout: 3000,
timeout: 5000,
}),
(error) => {
return new RelayError("unknown", error as Error);
Expand Down

0 comments on commit 41e83c0

Please sign in to comment.