You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assert should take some expression or function and throw an error if either resolves to false.
This allows us to abort execution in the event of a fail state. It's a good replacement for eg salesforce's failOnError, and can be applied equally to all jobs and adaptors. It doesn't need special API support. Although the operation in question does need to provide enough feedback to make a useful assertion on - ie, it must write something useful to state.data.
It should take a second argument as an error message which will be returned.
Eg
assert($.data.errors === 0, "Errors detected in upsert")
assert($.data.length, "No patient data found!")
The text was updated successfully, but these errors were encountered:
Assert should take some expression or function and throw an error if either resolves to
false
.This allows us to abort execution in the event of a fail state. It's a good replacement for eg salesforce's
failOnError
, and can be applied equally to all jobs and adaptors. It doesn't need special API support. Although the operation in question does need to provide enough feedback to make a useful assertion on - ie, it must write something useful to state.data.It should take a second argument as an error message which will be returned.
Eg
The text was updated successfully, but these errors were encountered: