← Back to team overview

dhis2-devs team mailing list archive

API - User Settings throwing Exceptions

 

Hi,

I am accessing the User Settings via the api, and if certain settings for a
user are not set, the api is throwing a 500 Null Pointer exception.

For example, on the demo server, this call properly returns "en":
https://apps.dhis2.org/demo/api/userSettings/keyUiLocale?user=admin

whereas this call throws a null pointer:
https://apps.dhis2.org/demo/api/userSettings/keyUiLocale?user=mobile

Also, some keys return Class Cast exceptions, such as this key:
keyMessageEmailNotification
https://apps.dhis2.org/demo/api/userSettings/keyMessageEmailNotification?user=admin
Request processing failed; nested exception is
java.lang.ClassCastException: java.lang.Boolean cannot be cast to
java.lang.String

This is for version 2.20.

Is it possible to fix these? Thanks,

Lorill

Follow ups