-
Notifications
You must be signed in to change notification settings - Fork 192
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
Cannot create User / Group Attributes with Kotlin SDK if User Attribute is not hidden #544
Comments
Thanks for the report. We'll need to investigate the |
After upgrading to looker 21.0.34, looks like |
Thanks for the update @frankspeak. I should be able to look at this more in the next few days. |
The error being obscured in the Kotlin SDK is:
|
For diagnosing #544 We have an outstanding feature request to improve analysis of Kotlin SDK errors, but this documents the encountered error in the Typescript SDK test, which has better error handling API Explorer and the existing Looker API Docs UI can be used to see what the actual 422 error is
@jkaster , not sure I understand - the problem only occurs when the value is not hidden - why is the |
Whoops, sorry I forgot to mention an important bit: When the parameter |
I'm using the SDK and I tried null, empty strings etc. However, it looks like the SDK always sends it and that's the bug. As in the description above, if you don't specify it in the web UI, everything works. |
Reopening because of the Kotlin SDK friction for null properties. |
Gson strips `null` properties from the JSON body so create_user_attribute no longer throws an error Updated test to verify correct behavior and report an error if the call fails Fixes #544
@frankspeak this should definitely be fixed with #601 now. That PR should get merged today |
#601) * chore: test create_user_attribute For diagnosing #544 We have an outstanding feature request to improve analysis of Kotlin SDK errors, but this documents the encountered error in the Typescript SDK test, which has better error handling API Explorer and the existing Looker API Docs UI can be used to see what the actual 422 error is * fix: Use Gson to serialize Kotlin SDK request bodies Gson strips `null` properties from the JSON body so create_user_attribute no longer throws an error Updated test to verify correct behavior and report an error if the call fails Fixes #544
Thanks for your patience and perseverance @frankspeak. Let me know if this doesn't solve the problem for you. |
Thanks @jkaster - after the fix, we appear to be in business. |
Thanks for the confirmation!
…On Tue, Apr 20, 2021, 8:39 PM frankspeak ***@***.***> wrote:
Thanks @jkaster <https://github.com/jkaster> - after the fix, we appear
to be in business.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#544 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABORGAQFJ5NVD6HHIADY5IDTJZCINANCNFSM42GAOE5A>
.
|
With the Kotlin SDK, running against Looker 7.20.12, user attribute operations fail if the user attribute is not hidden.
For
create_user_attribute()
for example, this works...… but this fails with a 422…
Similiar for
set_user_attribute_group_values
, this works...... but this fails with a 500...
Testing with the API, I think the issue may be caused by the SDK always sending the
hidden_value_domain_whitelist
, even if the value is not hidden.API Docs:
The text was updated successfully, but these errors were encountered: