Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Editing Channel errors #7571

Open
karolis-zukauskas opened this issue Jan 17, 2025 · 0 comments
Open

Improve Editing Channel errors #7571

karolis-zukauskas opened this issue Jan 17, 2025 · 0 comments

Comments

@karolis-zukauskas
Copy link

Is your feature request related to a problem? Please describe.
Attempting to delete an Element from a Channel that is not allowed results in an Error that has no "type" - errorNumber is not set - error in question is thrown here.

Calling code cannot catch such error (without comparing against message field).

Bonus: if this error is passed to the Frontend (in case of an electron desktop app), the error object is of class BackendError (IModelError) and has an errorNumber of 0 - which is IModelStatus.Success.

Image

Describe the solution you'd like
I'd like to be able to catch such error by checking its "type" and react to it e.g. by showing user a message that he cannot make changes to the Element(s).

Is there something I need to be calling before attempting to edit elements?

Additional context
iTwin.js: 4.10.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant