cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

ThingWorx Navigate is now Windchill Navigate Learn More

Translate the entire conversation x

Service error notification on a mashup

iguerra
16-Pearl

Service error notification on a mashup

Thingowtx 9.6.5

 

I know it's possible to show a message on a mashup if a service gives an error.

The message can be a fixed token on the available localizations, or a string.

 

The string can also report the [server-message] that is the string description of the error generated by the service (plus some additional text !), that is in this format

Error executing service ***SERVICENAME**** . Message :: ***ERROR DESCRIPTION *** - See Script Error Log for more details.

 

Showing "See Script Error Log for more details", but also "Error executing service" is not very professional, even more there is a "customer" reading that ... (which error log ??)

Moveover  I would show a dynamic text returned by the service (in case of error) as a "wanted behaviour" for the error notification, because there may be more conditions...

 

Is there a way to to that ?

For me it could be enough to show the error description only instead of the whole message. There should be something like [server-message-msg]

 

ACCEPTED SOLUTION

Accepted Solutions

Hello,

Not according to my knowledge. What I do is wrap my “external” services code in try/catch and return data + error messages as an infotable, which I then handle via expressions on the mashup side.

Regards,
Constantine

Vilia (my company) | GitHub | LinkedIn

View solution in original post

3 REPLIES 3

Hello,

Not according to my knowledge. What I do is wrap my “external” services code in try/catch and return data + error messages as an infotable, which I then handle via expressions on the mashup side.

Regards,
Constantine

Vilia (my company) | GitHub | LinkedIn

yes I understand, absolutely feasible, but each service with its own result data should be packed into anther datashape containing result data + eventual error code. So 2 datashapes wfor each type of result (where want to handle a possible error).

As a platform, would be easier if there was just the "native" output data on the service, and in case of error it can be shown with the status message (with a string).

I also use try-catch for all services, but for some "expected errors" due to user bad input data I wanted to throw a custom error that I would show using the narive "status message" directly, but not feasible now.

Thanks for your response. I try to propose an idea for a new "tag"  similar to [server-message] , in order to show just the error string  value, that is
Error executing service ***SERVICENAME**** . Message :: ***ERROR DESCRIPTION*** - See Script Error Log for more details.
That I could also tonekize (at service level) and show on the user language.

 

Hi @iguerra,

 

It appears that a response to this post answers your question. For the benefit of other Community Members who may have the same question, it would be great if you could designate it as the Accepted Solution.

In the event that this response did not answer your question, please post your current status so that we can continue to support.

 

Thanks for using the PTC Community!

 

Regards,

Tony
Announcements


Top Tags