First api route, error logging