willpublicmedia / npr-api-expressionengine

Access the NPR API from within ExpressionEngine.
1 stars 1 forks source link

Catch parse errors before save #13

Open areynold opened 3 years ago

areynold commented 3 years ago

In GitLab by @areynold on Aug 14, 2019, 11:05

API content is highly variable, and isn't always parsed correctly by the NPRAPI class.

Add a custom error handler and/or try/catch block to the parse command. The catch block should ideally use a custom validation rule to mark the NPR Story ID field as invalid, abort the entry save, and display the parse error on the channel entry form.

areynold commented 3 years ago

In GitLab by @areynold on Aug 14, 2019, 11:06

Starter code available on the parse-try-catch-block branch.