Skip to content

Commit

Permalink
Also throw error if JSON not present or empty
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoPino committed Jul 14, 2020
1 parent 6ee7cce commit 05d861e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Commands/JsonApiDrushCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,13 @@ public function ingest(
}

}

else {
throw new \Exception(
dt(
'JSON payload seems to be missing or invalid JSON. Suspending the ingest'
)
);
}

if ($field_name) {
foreach ($files as $file) {
Expand Down

0 comments on commit 05d861e

Please sign in to comment.