Skip to content

Commit e591fd3

Browse files
Update components/bigdatacorp/actions/get-company-data/get-company-data.mjs
Co-authored-by: michelle0927 <[email protected]>
1 parent 329a6d6 commit e591fd3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

components/bigdatacorp/actions/get-company-data/get-company-data.mjs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,12 @@ export default {
3434
},
3535
});
3636

37-
$.export("$summary", `Successfully sent the request for the '${this.dataset}' dataset. Status: ${response.Status[this.dataset][0].Message}`);
37+
const status = response.Status[this.dataset[0].Message;
38+
if (status === "OK") {
39+
$.export("$summary", `Successfully sent the request for the '${this.dataset}' dataset. Status: ${status}`);
40+
} else {
41+
throw new Error(status);
42+
}
3843

3944
return response;
4045
},

0 commit comments

Comments
 (0)