Skip to content

Commit

Permalink
fix(mall): throw on graphql errors
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyBykov authored and rarous committed Nov 5, 2024
1 parent 28bd8ea commit 7940e5d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
6 changes: 6 additions & 0 deletions actors/mall-daily/.actor/actor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"actorSpecification": 1,
"name": "mall-cz-friday",
"version": "0.1",
"buildTag": "latest"
}
4 changes: 3 additions & 1 deletion actors/mall-daily/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
apify_storage
node_modules

apify_storage
# Added by Apify CLI
storage
.venv
7 changes: 0 additions & 7 deletions actors/mall-daily/apify.json

This file was deleted.

2 changes: 1 addition & 1 deletion actors/mall-daily/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ async function main() {
data: { getCampaign: data } = {},
errors
} = json;
if (errors) log.error("GraphQL errors", errors);
if (errors) throw new Error(errors[0].message);

const {
productCollection: { items = [] } = {},
Expand Down

0 comments on commit 7940e5d

Please sign in to comment.