rest: add error handling test
rest: Throw nice error if organisation is not configured
rest: Improve error logging