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

Include missing paths in MaxRetryExceededError instances #874

Merged
merged 4 commits into from
Sep 11, 2017

Conversation

asyncanup
Copy link
Contributor

this will help developers understand data source and service failures better

this will help developers understand data source and service failures better
this.message = "The allowed number of retries have been exceeded.";
this.missingPaths = missingPaths || [];
this.stack = (new Error()).stack;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we're in the client this may not be possible, but is there something like captureStackTrace available across different browsers?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To remain cross platform I think (new Error()).stack is the best that can be done here.

@coveralls
Copy link

coveralls commented Sep 8, 2017

Coverage Status

Coverage increased (+0.003%) to 91.972% when pulling 01198ad on UIPLATFORM-459 into 596ca02 on master.

@@ -12,17 +12,18 @@ var MaxRetryExceededError = require("./../../errors/MaxRetryExceededError");
*/
module.exports = function setRequestCycle(model, observer, groups,
isJSONGraph, isProgressive, count) {
var requestedAndOptimizedPaths = setGroupsIntoCache(model, groups);
var optimizedPaths = requestedAndOptimizedPaths.optimizedPaths;
var requestedPaths = requestedAndOptimizedPaths.requestedPaths;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something to consider which could be a little scary: we're going from conditionally setting groups into cache, to always setting. It might be that the shape of what is set makes this inconsequential, but could be worth a close look before you merge.

Copy link
Contributor Author

@asyncanup asyncanup Sep 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After discussion with Jafar and Steve, it seems logical to add any potential results returned from server into cache, even if it was on the last retried request.
Good catch though!

Copy link
Contributor

@steveorsomethin steveorsomethin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from being paranoid about setGroupsIntoCache changes, LGTM.

@coveralls
Copy link

coveralls commented Sep 11, 2017

Coverage Status

Coverage increased (+0.08%) to 92.045% when pulling 20aad1b on UIPLATFORM-459 into 596ca02 on master.

@coveralls
Copy link

coveralls commented Sep 11, 2017

Coverage Status

Coverage increased (+0.08%) to 92.045% when pulling d86f2ee on UIPLATFORM-459 into 596ca02 on master.

@jhusain
Copy link
Contributor

jhusain commented Sep 11, 2017

LGTM

@jhusain jhusain closed this Sep 11, 2017
@jhusain jhusain reopened this Sep 11, 2017
@coveralls
Copy link

coveralls commented Sep 11, 2017

Coverage Status

Coverage increased (+0.08%) to 92.045% when pulling d86f2ee on UIPLATFORM-459 into 596ca02 on master.

@asyncanup asyncanup merged commit 9d12c0f into master Sep 11, 2017
@asyncanup asyncanup deleted the UIPLATFORM-459 branch September 15, 2017 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants