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

Fix issue of workbench not outputting errors #32

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions workbench/public/components/Main/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,11 @@ export class Main extends React.Component<MainProps, MainState> {
let err = response.data.resp;
console.log("Error occurred when processing query response: ", err)

// Mark fulfilled to true as long as the data is fulfilled
if (response.data.body) {
// Exclude a special case from the error cases:
// When downloading the csv result, it gets the "Unable to parse/serialize body" response
// But data is also returned in data body. For this case:
// Mark fulfilled to true for this case to write the csv result to downloading file
if (response.data.body && err == "Unable to parse/serialize body") {
return {
fulfilled: true,
errorMessage: err,
Expand All @@ -287,6 +290,7 @@ export class Main extends React.Component<MainProps, MainState> {
return {
fulfilled: false,
errorMessage: err,
data: ''
};
}

Expand Down