improve error handling, fix bug where app crash when orgid is not found