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

MLIBZ-2497: Return correct error message if Files.findById() is called without a file id #373

Merged
merged 2 commits into from Oct 18, 2018

Conversation

@thomasconner
Copy link
Contributor

commented Oct 17, 2018

Description

Steps To Reproduce:

  1. Try to download a file with:
Kinvey.Files.findById();

Expected Result: A meaningful error message, explaining that the id is required. The same problem is valid for Kinvey.Files.download()

Actual Result: The following error:

TypeError: Cannot read property 'mimeType' of undefined
      at http://localhost:64320/packages/kinvey-html5-sdk/dist/kinvey-html5-sdk.js:33816:33
      at tryCatch (http://localhost:64320/packages/kinvey-html5-sdk/dist/kinvey-html5-sdk.js:967:12)
      at invokeCallback (http://localhost:64320/packages/kinvey-html5-sdk/dist/kinvey-html5-sdk.js:982:13)
      at http://localhost:64320/packages/kinvey-html5-sdk/dist/kinvey-html5-sdk.js:728:16
      at MutationObserver.flush (http://localhost:64320/packages/kinvey-html5-sdk/dist/kinvey-html5-sdk.js:677:5)

Changes

  • Check for a valid id and throw an error message if one is not provided.

@thomasconner thomasconner self-assigned this Oct 17, 2018

@thomasconner thomasconner requested a review from vinaygahlawat Oct 17, 2018

@thomasconner thomasconner merged commit feb9aa8 into master Oct 18, 2018

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@thomasconner thomasconner deleted the MLIBZ-2497_findById_error_message branch Oct 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.