Common errors thrown in majority of the iModel Hub calls

IModelHubError with IModelHubStatus.UserDoesNotHavePermission is thrown when the user does not have permission to perform that call. Users need at least Read permission to perform most of the calls. [IModelHubStatus.FailedToGetProjectPermissions]$(bentley), [IModelHubStatus.FailedToGetAssetPermissions]$(bentley) can be thrown when call to RBAC service has failed. See Permissions for more information.

IModelHubError with IModelHubStatus.iModelDoesNotExist occurs when an HubIModel with specified Guid value does not exist on that project. That id might belong to an iModel for a different project, a deleted iModel, or it might not be associated with any iModel at all.

IModelHubError with IModelHubStatus.iModelIsLocked or IModelHubStatus.iModelIsNotInitialized can occur when sending requests to iModel that was created, but not initialized by iModel Hub.

IModelHubError with IModelHubStatus.OperationFailed, IModelHubStatus.DatabaseOperationFailed or IModelHubStatus.DatabaseTemporarilyLocked can be thrown when an issue with a dependent service has occured within iModel Hub. In most of the cases these requests can be retried later.

IModelHubClientError with IModelHubStatus.UndefinedArgumentError or IModelHubStatus.InvalidArgumentError if one of the required arguments is undefined or has an invalid value.

WsgError is thrown for errors that were returned from the Web Service itself and didn't reach iModel Hub.

AuthenticationError is thrown when request is redirected to a login page. This occurs when access token is invalid or expired.

ResponseError is thrown when error could not be parsed. This can occur when error happened on the client side or web service could not return a json response.

Last Updated: 13 June, 2024