fix(rest): make sure the findById method reject the promise when needed