fix issue with broken calendar
add userId and a proper error msg to scan api