api handles params validation now, some errors