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

Error Details for TbdexHttpServer responses #260

Open
chris-tbd opened this issue Jul 17, 2024 · 0 comments
Open

Error Details for TbdexHttpServer responses #260

chris-tbd opened this issue Jul 17, 2024 · 0 comments

Comments

@chris-tbd
Copy link

Context: building an in-browser Wallet quickstart for the developer site here: TBD54566975/developer.tbd.website@75123c4

We have an issue where if we try and ping our PFI in rapid succession via TbdexHttpClient.getExchange(), it returns a 401 code; however after enough retries the exchange ends up populating and the error stops. I could imagine wallet devs may want to go grab the exchange right after submitting an RFQ to create their own clientside exchange object, so this error might be confusing for them.

My suggestion would be to do one or many of the following:

  • Add retry logic to the TbdexHttpClient.getExchange() method to try and reduce or eliminate the likelihood of this error occurring.
  • Provide more descriptive response from the TbdexHttpServer either by keeping a cache of unwritten exchanges, returning a more useful error code, or something like that.
  • Making the return type of TbdexHttpClient.createExchange(rfq) an exchange so that wallet devs have that on hand. Additionally, I wanted to confirm if that actually waits for successful creation and db write on the serverside or if it will return early
Viruzvolcano pushed a commit to Viruzvolcano/tbdex-js that referenced this issue Aug 12, 2024
* Address tbdex TBD54566975#260

* Add name, group, and description to PaymentMethod

* Add min and max to PaymentMethod

* Add estimatedSettlementTime

* Update tbdex to latest main and move compiled-validators to cjs

* audit fix

* Update rfq.ts

Co-authored-by: nitro-neal <[email protected]>

* add seconds comment

* Replace require with import in compiled validators

---------

Co-authored-by: nitro-neal <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant