Skip to content
This repository has been archived by the owner on Feb 2, 2024. It is now read-only.

Handle error when Barn is down #408

Merged
merged 1 commit into from
Mar 29, 2023
Merged

Handle error when Barn is down #408

merged 1 commit into from
Mar 29, 2023

Conversation

anxolin
Copy link
Contributor

@anxolin anxolin commented Mar 29, 2023

Summary

This PR adds some resilience in case BARN is down (which is more fragile and less important than PROD)

In case Barn is down, it will just show PROD data.

Context

https://cowservices.slack.com/archives/C0361CDD1FZ/p1680083877919069?thread_ts=1680081047.924569&cid=C0361CDD1FZ

Technical comment

I took the opportunity of this change to not use 2 SDKs, only one is needed (since we can pass the environment each time)

To Test

**TEST BOTH BARN & PROD orders/trades are displayed in the explorer.

We cannot make it fail right now to test it work, so i will just make another PR making BARN to fail on porpouse to verify that it still shows the PROD data

@vercel
Copy link

vercel bot commented Mar 29, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
explorer-dev ✅ Ready (Inspect) Visit Preview 💬 Add your feedback

📖 Storybook ↗︎

Copy link
Collaborator

@alfetopito alfetopito left a comment

Choose a reason for hiding this comment

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

I was going to suggest to use Promise.allSettled but your way is more explicitly handling barn failures and letting prod failures pop up as intended

@anxolin anxolin merged commit e579247 into hotfix/2.19.1 Mar 29, 2023
This was referenced Mar 29, 2023
@alfetopito alfetopito deleted the handle-barn-down branch March 30, 2023 08:28
@anxolin anxolin mentioned this pull request Dec 9, 2022
9 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants