Skip to content
This repository was archived by the owner on Mar 4, 2026. It is now read-only.

fix: provide custom error for FieldValue subclasses#771

Merged
schmidt-sebastian merged 3 commits intomasterfrom
mrschmidt/bettererror
Oct 3, 2019
Merged

fix: provide custom error for FieldValue subclasses#771
schmidt-sebastian merged 3 commits intomasterfrom
mrschmidt/bettererror

Conversation

@schmidt-sebastian
Copy link
Copy Markdown
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
Copy Markdown

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

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