OneIdentity / IdentityManager.Imx

HTML5 source code for Identity Manager web apps
Other
28 stars 109 forks source link

Custom error messages (errorHandler) #160

Closed juancarloscamargo closed 1 month ago

juancarloscamargo commented 1 month ago

Hi,

I'm trying to have the StringErrors translated in my custom qer-app-portal. These are messages shown by the angular errorHandler. In my case, I need to translate this: image

when a non authorized account tries to log in via oAuth.

I've tried the fix with the VI.Base.custom.vii UTF-8 BOM placed in the bin folder of the apiserver:

`[en-US] strError2329013="Necesita una cuenta protegida para acceder a este servicio."

[es-ES] strError2329013="Necesita una cuenta protegida para acceder a este servicio."

[es] strError2329013="Necesita una cuenta protegida para acceder a este servicio."

[default] strError2329013="Necesita una cuenta protegida para acceder a este servicio."`

, but it didnt seem to work just as it did in the old web portal/applications. Is there any other workaround or should I extend the errorHandler with my own?

Thanks!

hannoquest commented 1 month ago

Hi,

I assume you are connected with an application server, please try putting the custom.vii file on the app server's bin directory.

juancarloscamargo commented 1 month ago

Hi,

Thanks. The apiserver is configured to connect via appserver, right. Placed the file in the bin directory of the app server , of the apiserver's too and restarted both, but it keeps showing the error in plain english. The file is saved with utf-8 bom , maybe I'm not capturing the right error number.

NielsDeGroot commented 1 month ago

Hello Juan Carlos,

Works for me with direct connection and over appserver.

[en-US] strError810017="You shall not pass."

[nl-NL] strError810017="Geen toegang."

[default] strError810017="Wrong, try again."

The language specific entry also gets picked-up.

juancarloscamargo commented 1 month ago

Hi Niels!! Thanks. I was in a hurry with a release and couldn't find a working solution, so eventually I've extended the ErrorHandler with a solution of my own. But I would like to stick to the "rule", so I'll retry again.

My VI.Base.custom.vii UTF-8 BOM file is placed in the bin folder of both the apiserver and appserver. I'll doublecheck again and retry.

All in all, it is a local problem for, as you both point out, it works. I'll close the issue later today. Thanks again!