CLDIDE-1613: fix bug in parameters encoding; provide user-friendly error messages