Issue here is, actual code can be bit more complicated than that.
eg:
https://github.com/wso2/product-is/blob/master/portal/osgi-services/org.wso2.is.portal.user.client.api/src/main/java/org/wso2/is/portal/user/client/api/RecoveryMgtServiceImpl.java#L150:L163
On Mon, Mar 20, 2017 at 12:44 PM, Sa
IMO following approach would be better,
try {
// some logic goes here, that might throw an exception.
// e.g.
callOSGiService("org.wso2.is.portal.user.client.api.RecoveryMgtService","isNotificationBasedPasswordRe",
[]);
return {success: true, message: {title: "Success", body: "Security question
UUF team,
So what is the best practice we need to document ? Currently I see people
just wrapping in Java and re-throwing some kind of UI error. I don't think
wiring UI specific logic in Java is the best way to do this. And it's
annoying to pass a "isSuccess" all over the code.
Maybe we should ask
On Mon, Mar 20, 2017 at 9:42 AM, Pushpalanka Jayawardhana
wrote:
> Hi All,
>
> Shall we add a section on 'Error handling' to the UUF best practices
> documentation to capture information on this?
>
> +1
> On Thu, Feb 2, 2017 at 8:43 AM, Dakshika Jayathilaka
> wrote:
>
>> +1 for KasunGs suggesti
Hi All,
Shall we add a section on 'Error handling' to the UUF best practices
documentation to capture information on this?
On Thu, Feb 2, 2017 at 8:43 AM, Dakshika Jayathilaka
wrote:
> +1 for KasunGs suggestion.
>
> Even UIExceptions can be different.
>
> *Types of UI errors*
>
>- User inpu
+1 for KasunGs suggestion.
Even UIExceptions can be different.
*Types of UI errors*
- User input errors
- App errors
- Incompatible state errors
IMHO depending on the permission level, above error messages can be
optimized to give optimal user experience.
Regards,
*Dakshika Jayathila
To not disclose the back-end server details to the user, we should always
catch the exceptions in the UUF app. If it is a UIException, then we can
show the error message to the user. Otherwise, we should show a generic
error message - something like "An error has occurred while processing your
requ
Hi,
What are the good practices around exception handling in UUF in scenarios
like handling exceptions thrown when callOSGiService.
for example consider below method.
> /**
> * Check whether the notification based password recovery enabled
> */
>
> function isNotificationBasedP