Is it possible to stop the deletion in the "before delete" operation hook without passing an error? I have looked at the datasource connector source code and there does not appear to be a way currently.
I may be approaching my problem the wrong way. I want to "soft delete" the data for some models, and I figured the best way to do that without hacking a bunch of routes would be in the "before delete" hook. I want to stop the "hard delete" in most cases and instead set an "isDeleted" bool on the object. I also need to be able to fully delete the row for unit tests and such, so I added a flag to the delete options to bypass the soft delete.
For my use case, as far as the user is concerned I want them to think the delete went perfectly, so returning an error from the destroy call even if it has the statusId set to 200 is a little counterintuitive.
Is there another way to go about this, or would the community be open to a small change in the datasource juggler to allow for non-error delete overrides?
Thanks,
Andy