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

fix: provide custom error for FieldValue subclasses #771

Merged
merged 3 commits into from
Oct 3, 2019

Conversation

schmidt-sebastian
Copy link
Contributor

This PR extends the custom errors for instances of FieldValue classes that do not match the expected prototype to the FieldValue sentinel classes FieldTransform, ServerTimestampTransform, ArrayUnionTransform, ArrayRemoveTransform and NumericIncrementTransform.

Fixes #760

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 1, 2019
@schmidt-sebastian schmidt-sebastian changed the title fix: provide custom object for FieldValue subclasses fix: provide custom error for FieldValue subclasses Oct 1, 2019
This PR extends the custom errors for instances of FieldValue classes that do not match the expected prototype to the FieldValue sentinel classes FieldTransform, ServerTimestampTransform, ArrayUnionTransform, ArrayRemoveTransform and NumericIncrementTransform.

Fixes #760
@codecov
Copy link

codecov bot commented Oct 2, 2019

Codecov Report

Merging #771 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #771      +/-   ##
==========================================
+ Coverage   96.46%   96.47%   +<.01%     
==========================================
  Files          20       20              
  Lines        2236     2241       +5     
  Branches      467      467              
==========================================
+ Hits         2157     2162       +5     
  Misses         24       24              
  Partials       55       55
Impacted Files Coverage Δ
dev/src/validate.ts 90.58% <100%> (+0.58%) ⬆️

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 39adabb...ab5f1bc. Read the comment docs.

@schmidt-sebastian schmidt-sebastian added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 3, 2019
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 3, 2019
@schmidt-sebastian schmidt-sebastian merged commit 29c3e9b into master Oct 3, 2019
@schmidt-sebastian schmidt-sebastian deleted the mrschmidt/bettererror branch January 3, 2020 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sentinel values/FieldValue failed the type check when coming from package
4 participants