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

Refactor raygun.transport.ts to use Promises instead of callbaks #197

Closed
miquelbeltran opened this issue May 7, 2024 · 0 comments · Fixed by #200
Closed

Refactor raygun.transport.ts to use Promises instead of callbaks #197

miquelbeltran opened this issue May 7, 2024 · 0 comments · Fixed by #200
Assignees

Comments

@miquelbeltran
Copy link
Contributor

miquelbeltran commented May 7, 2024

Please describe your new feature request

raygun.transport.ts uses a Callback to tell if the request completed or not.

If we want to get rid of callbacks, this is the place to start!

Describe the solution you'd like

Replace the callback response with a Promise.

Describe alternatives you've considered

  • TBD

Additional context

Related to #196

Originally posted by @sumitramanga in #181 (comment)

@github-project-automation github-project-automation bot moved this to Needs Triage in Raygun4Node board May 7, 2024
@miquelbeltran miquelbeltran self-assigned this May 7, 2024
@miquelbeltran miquelbeltran moved this from Needs Triage to In Progress in Raygun4Node board May 7, 2024
miquelbeltran added a commit that referenced this issue May 9, 2024
* rename legacy send method to sendWithCallback

* implemented async send wrapper

* add async send test suite

* update domain example to use async send

* prettier run

* cleanup

* fix test

* wip updating expressHandler to use async send

* fixing tests

* format

* replace sendWithCallback to send

* wip update docs

* cleanup of sendSync

* add TODOs for refactor

* update README

* prettier

* add send bind again

* cleanup test

* clenaup tests

* change title

* Update lib/raygun.ts

Co-authored-by: Sumitra Manga <[email protected]>

* wrap HTTP request in Promise

* fix: #198 reject promise on error

* cleanup

* adapt batch transport to transport with Promise

* tests are passing

* tests are passing

* WIP

* fix test

* fixes and cleanup

* add tags to debug loglines

* improve logs in raygun.transport

* fix: #140 throw error on incoming message too large

* improving error logs

* error cleanup

* package-lock.json changes

---------

Co-authored-by: Sumitra Manga <[email protected]>
@github-project-automation github-project-automation bot moved this from In Progress to Merged in Raygun4Node board May 9, 2024
@miquelbeltran miquelbeltran moved this from Merged to Released in Raygun4Node board May 17, 2024
@miquelbeltran miquelbeltran moved this from Released to Merged in Raygun4Node board May 17, 2024
@miquelbeltran miquelbeltran mentioned this issue May 23, 2024
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Merged
Development

Successfully merging a pull request may close this issue.

1 participant