Return error from getMonitorID instead of panic #2632
Closed
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
fix: Adds error handling and slice length check for
getMonitorId
synthetics resource helpers.Fixes #2631
Type of change
Please delete options that are not relevant.
Checklist:
Please delete options that are not relevant.
How to test this change?
I am a little unclear on how to build/test this provider locally. The contributor instructions do not say how to set up my TF configuration to use a local provider. Unfortunately, internet results vary as well.
I also am unable to run
make test
; I get errors relating to build constraints:To test, I would build this provider locally and run the program that triggered the panic and hopefully get an error instead!
update: I figured out how to attach a local provider binary and with that I get an error as expected.
I am very happy to work with you on testing but I'd like some pointers on how to set up a local provider and why
make
is failing for me.