better handling of errors for format-params