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

MIBZ-2453: Kinvey.Files.downloadByUrl should call the error function if the server returns an error #333

merged 2 commits into from Jul 25, 2018


None yet
2 participants

thomasconner commented Jul 23, 2018


Steps To Reproduce:

  1. Stream a file with ttl = 0:, { stream: true, ttl: 0 });
  1. Try to download the file using the expired __downloadURL_:

Expected Result: The error function is called with the error from the server.
Actual Result: The success function is called with a string, containing an XML from the server:

<?xml version='1.0' encoding='UTF-8'?><Error><Code>ExpiredToken</Code><Message>The provided token has expired.</Message><Details>Request has expired: 1523979099</Details></Error>


  • Reject with error from Network response.
  • Only send X-Kinvey-Device-Information header to a endpoint.
MIBZ-2453: Reject with error from Network response
Only send X-Kinvey-Device-Information header to a endpoint

@thomasconner thomasconner self-assigned this Jul 23, 2018

@thomasconner thomasconner requested a review from vinaygahlawat Jul 23, 2018

headers['X-Kinvey-Device-Information'] = deviceInformation(this.pkg);
if (kinveyUrlRegex.test(url)) {
// Add the X-Kinvey-Device-Information header
headers['X-Kinvey-Device-Information'] = deviceInformation(this.pkg);

This comment has been minimized.


vinaygahlawat Jul 24, 2018


How is the setting of the X-Kinvey-Device-Information header related to the issue of calling success when an error is returned from the backend?

This comment has been minimized.


thomasconner Jul 24, 2018


I was getting errors where Google was reject the GET request because of the X-Kinvey-Device-Information header. It was not causing the issue but it was preventing me from testing. I went ahead and made the change here.

@thomasconner thomasconner merged commit 928895a into master Jul 25, 2018

@thomasconner thomasconner deleted the MLIBZ-2453_Fix_File_Downloads branch Jul 25, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment