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

RemoteGalyleo.getFilteredRows should return an empty list on a http error #145

Open
rickmcgeer opened this issue Jan 17, 2023 · 1 comment
Assignees
Labels
bug Something isn't working review fixed, ready for review

Comments

@rickmcgeer
Copy link
Contributor

We can get a spurious 400 on this, particularly if (as is the case with Google App Engine) the server is slow to respond. Therefore, what we need to do is catch the error in getFilteredRows and return a blank array in the case of an error.

@rickmcgeer rickmcgeer added the bug Something isn't working label Jan 17, 2023
@rickmcgeer rickmcgeer added the review fixed, ready for review label Jan 17, 2023
@rickmcgeer
Copy link
Contributor Author

Now fixed. In RemoteGalyleoTable.getFilteredRows, the code

  return await urlFetcher.readJson();

is now:

  try {
      return await urlFetcher.readJson();
    } catch (error) {
      return [];
    }

See:

$world.execCommand("open browser", {moduleName: "galyleo-data/galyleo-data.js", packageName: "galyleo-dashboard", codeEntity: [{"name":"RemoteGalyleoTable","type":"class-decl"},{"name":"getFilteredRows","type":"class-instance-method"}]});

Fix was done on branch factored-dashboard, will merge when factored-dashboard is merged
Assigning to @merryman for review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working review fixed, ready for review
Projects
None yet
Development

No branches or pull requests

2 participants