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(fastly): Return undefined for dict values of write-only edge dicts #28

Merged
merged 1 commit into from
Jan 22, 2019

Conversation

trieloff
Copy link

Getting the value of an edge dictionary value for a write-only dictionary results in an error 400
from the Fastly API, which is correct, but not helpful. Because readDictItem always gets the
dictionary metadata before reading, we can guard against this error and return a proper response
(status: 403, item_value: undefined)

fixes #27

Please ensure your pull request adheres to the following guidelines:

  • make sure to link the related issues in this description
  • when merging / squashing, make sure the fixed issue references are visible in the commits, for easy compilation of release notes

Related Issues

Thanks for contributing!

Getting the value of an edge dictionary value for a write-only dictionary results in an error 400
from the Fastly API, which is correct, but not helpful. Because `readDictItem` always gets the
dictionary metadata before reading, we can guard against this error and return a proper response
(status: 403, item_value: undefined)

fixes #27
@codecov
Copy link

codecov bot commented Jan 22, 2019

Codecov Report

Merging #28 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #28   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           3      3           
  Lines         203    205    +2     
=====================================
+ Hits          203    205    +2
Impacted Files Coverage Δ
src/index.js 100% <100%> (ø) ⬆️

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 436b119...ab5972a. Read the comment docs.

@trieloff trieloff merged commit 1dc6072 into master Jan 22, 2019
@trieloff
Copy link
Author

🎉 This PR is included in version 1.3.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@tripodsan tripodsan deleted the write-only-dicts branch July 10, 2019 02:34
@tripodsan tripodsan restored the write-only-dicts branch July 10, 2019 02:34
@tripodsan tripodsan deleted the write-only-dicts branch July 10, 2019 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

writeDictItems cannot overwrite
1 participant