This repository was archived by the owner on Oct 17, 2023. It is now read-only.
Fail more noisily if no path or file provided to Request.get_file#16
Merged
alexmac05 merged 1 commit intohellosign:v3from Jan 21, 2018
Merged
Fail more noisily if no path or file provided to Request.get_file#16alexmac05 merged 1 commit intohellosign:v3from
alexmac05 merged 1 commit intohellosign:v3from
Conversation
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
I just spent an hour trying to figure out why get_signature_request_file was returning False. The problem turned out to be that I wasn't providing either of the path_or_file or filename arguments. This patch catches that case and raises a ValueError.
This fix is very limited in scope. I think the better fix would be to let all exceptions bubble up instead of trapping them all in a try/except and returning False. That way there is more information available to the caller. I have avoided doing that in my patch because the SDK seems committed to a paradigm of True for success, False for failure. If you're open to revisiting that, let's do it.