Skip to content

Commit

Permalink
fixed no-error-output bug in workbench (#32)
Browse files Browse the repository at this point in the history
Signed-off-by: David Cui <[email protected]>
  • Loading branch information
davidcui1225 committed May 6, 2021
1 parent 16a989c commit e5b5f74
Showing 1 changed file with 6 additions and 2 deletions.
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

0 comments on commit e5b5f74

Please sign in to comment.