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

feat: improve $ helpers and error object #113

Merged
merged 6 commits into from
Jun 17, 2020
Merged

feat: improve $ helpers and error object #113

merged 6 commits into from
Jun 17, 2020

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Jun 16, 2020

  • Use destr for $ helpers ($get, $post, ...) for smart and secure (prototype pollution preventation) decode json reponses but fall-back in case of response is not json
  • Add error.statusCode and err.response.data? for better DX
  • Allow chaining error using onError hook for better control

image

TODO

  • Tests
  • Docs

Credits

@pi0 pi0 requested review from atinux and kevinmarrec June 16, 2020 18:53
@pi0 pi0 changed the base branch from dev to master June 16, 2020 18:56
@pi0 pi0 changed the base branch from master to dev June 16, 2020 18:56
@pi0 pi0 marked this pull request as draft June 16, 2020 19:02
@pi0 pi0 changed the title feat: improve $ helpers usage feat: improve $ helpers and error object Jun 16, 2020
@pi0 pi0 assigned pi0 and unassigned pi0 Jun 16, 2020
@pi0 pi0 force-pushed the feat/improve- branch from 7daf49b to 359e113 Compare June 16, 2020 19:55
@pi0 pi0 marked this pull request as ready for review June 16, 2020 19:58
@codecov-commenter
Copy link

Codecov Report

Merging #113 into dev will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##              dev     #113   +/-   ##
=======================================
  Coverage   91.22%   91.22%           
=======================================
  Files           1        1           
  Lines          57       57           
  Branches       30       30           
=======================================
  Hits           52       52           
  Misses          5        5           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6fdc49f...9df16bb. Read the comment docs.

@pi0 pi0 merged commit ada7387 into dev Jun 17, 2020
@pi0 pi0 deleted the feat/improve-💵 branch June 17, 2020 11:01
@pi0
Copy link
Member Author

pi0 commented Jun 17, 2020

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.

3 participants