Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom error messages (errorHandler) #160

Closed
juancarloscamargo opened this issue Jul 11, 2024 · 4 comments
Closed

Custom error messages (errorHandler) #160

juancarloscamargo opened this issue Jul 11, 2024 · 4 comments

Comments

@juancarloscamargo
Copy link

juancarloscamargo commented Jul 11, 2024

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
Copy link
Collaborator

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
Copy link
Author

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
Copy link

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
Copy link
Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants