add detailed exception message in `AbstractPatch::query()`