chore: idParam is now an option of resource
feature: added correct error handling
fix: normalized error message