fix: show error when too many ingredient values are provided - #2711
Open
bartvanandel wants to merge 1 commit into
Open
fix: show error when too many ingredient values are provided#2711bartvanandel wants to merge 1 commit into
bartvanandel wants to merge 1 commit into
Conversation
Contributor
|
Testing: You could then add tests to that file for:
It's a bit of a fudge because it's not strictly (just) the node api that you are testing, but it should work. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Provide an explicit error message when the number of values provided to
set ingValuesexceeds the number of configured ingredients, e.g. due to adding too many arguments in a test. This is much easier to debug than the error which would occur before this change (Error: Failed to hydrate operation '[...]': TypeError: Cannot read properties of undefined (reading 'name')).AI disclosure
No AI was used at all.
Test Coverage
Haven't added any tests. Not sure how internals are currently tested. Please point me to an example if this is desired.