how to track error and error code while EDITOR_LOADING_FAILED

Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
shikhar_472
Posts: 99
Joined: Fri Jul 01, 2022 12:08 pm

how to track error and error code while EDITOR_LOADING_FAILED

Post by shikhar_472 »

Hi Team,

How to track the error and error status code when document go into event EDITOR_LOADING_FAILED,
I am passing the editor object which contains below data i want to provide the alert box according the error status code and error
image.png
image.png (42.84 KiB) Viewed 562 times
Gabriel Titerlea
Site Admin
Posts: 95
Joined: Thu Jun 09, 2016 2:01 pm

Re: how to track error and error code while EDITOR_LOADING_FAILED

Post by Gabriel Titerlea »

Hello,

We don't expose this information to javascript-plugin-code.
How/From where are you loading your documents? Are you using the WebDav plugin?

Best,
Gabriel
shikhar_472
Posts: 99
Joined: Fri Jul 01, 2022 12:08 pm

Re: how to track error and error code while EDITOR_LOADING_FAILED

Post by shikhar_472 »

yes i am using the web-dav plugin if in case any error occures in rest call it want to alert the message according to the error code

http://localhost/oxygen-xml-web-author/ ... Only=false
Gabriel Titerlea
Site Admin
Posts: 95
Joined: Thu Jun 09, 2016 2:01 pm

Re: how to track error and error code while EDITOR_LOADING_FAILED

Post by Gabriel Titerlea »

Hello,

One way to change the error message is by modifying the code that reads the content from WebDav [1]. You can throw an IOException with the error message you want and this error message will be displayed when loading fails.

Alternatively, you can rewrite the document loading code. You can prevent the default document load and instead, load the document using javascript code. This way you have control over error handling, you will have to implement it yourself. But since this approach requires many code changes I will only talk about it if you want to go this route, if the above solution doesn't work for you.

Best,
Gabriel

[1] https://github.com/oxygenxml/web-author ... #L110-L146
Post Reply