Adding an error for parameters that cannot be serialized to json