angshu | adding error handling for APIs. Also added encounter GET API