Quantcast
Channel: VMware Communities : Discussion List - vSphere Client SDK
Viewing all articles
Browse latest Browse all 2218

Exception handling using the html-bridge

$
0
0

Hi,

 

we are starting to create plugin views using the html-Bridge.  All was working well, until we started working on exception handling.

In the dataservice, an error has happened while retrieving the data -so a RuntimeException is thrown.   But in our htmlview - in the

.fail(function(jyXHR, Status, error) - the value of  error is always "Not Found".

 

I thought I was doing something wrong, so I tried the same in the globalview-html plugin - but the results are the same.

Here I just threw a fake RuntimeException during the save Settings.

>throw new RuntimeException("abcd");

 

This gets caught in the Service Controller - in the handleDataAccessException() - which returns

>return Collections.singletonMap("message", ex.getMessage());

 

Here we can see the message

"Error while saving Setting in null\globalview/Settings.properties"

 

But in the settingsView.js, the .fail  is called, and the error is also "Not Found".

 

Could you please tell me what is wrong here?

thanks

Cathy


Viewing all articles
Browse latest Browse all 2218

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>