Error handling, error object

WebViewer Version: 10.5.0

Do you have an issue with a specific file(s)? NO
Can you reproduce using one of our samples or online demos? NO
Are you using the WebViewer server? NO
Does the issue only happen on certain browsers? NO
Is your issue related to a front-end framework? NO
Is your issue related to annotations? NO

Please give a brief summary of your issue:
(Think of this as an email subject)

I want to capture the error object to use status code and error message

Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)

I am working on how my application will behave in case of possible errors and when I do my tests, inside the error object I can’t find the status or message properties.
Don’t these properties come inside this object? I can only see the detail property.
Is it necessary to make some extra configuration to obtain a more descriptive error object?
If this is already this way by default in the sdk, is it possible to add these properties? With whom should I escalate this requirement?
Thank you!

Please provide a link to a minimal sample where the issue is reproducible:

1 Like

Hello emiliano.pintos,

Thank you for raising this,

What type of errors are you trying to catch? Loading errors?
We have a callback onError you can pass into while loading a document which will throw if it errors:

If you can provide some specific examples I can assist further.

Thank you!

1 Like

Hi @tgordon , thanks for your reply.

Yes, I’m trying to catch loading errors. I have a callback which triggers when this happens but the error object doesn’t have the information I need to show it to the user.
I want to show them the status code and a message to describe what was the type of error.
Do you know if these properties comes in the error object?
Thank you.

1 Like

Hello emiliano.pintos,

You can extract the error details through the event that is passed through, you can read more here: Ui-events | Apryse Documentation

Best regards,

1 Like