flagsmith: Bug: Flagsmith returning 502 on /identities API
Describe the bug
We have integrated the /identities API and we are trying to call it with the following payload but there seems some issue with this data -
Here when identifier is 68385f9726ad05c8e551a8d5be5cd8213f1e733346a9eb00e86f83df94639555, API returns 502 but when it’s any other test identifier it works.
Also, I tried to replicate it with a different env key, there we don’t see 502. This is only happening with the env key that we are using.
-> Request
curl --location 'https://edge.api.flagsmith.com/api/v1/identities' \
--header 'X-Environment-Key: <key>' \
--header 'Content-Type: application/json' \
--data '{
"identifier": "68385f9726ad05c8e551a8d5be5cd8213f1e733346a9eb00e86f83df94639555",
"traits": [
{
"trait_key": "instanceId",
"trait_value": "650c79f77ade126caf5852fa"
},
{
"trait_key": "isTelemetryOn",
"trait_value": false
},
{
"trait_key": "tenantId",
"trait_value": "650c79fa7ade126caf585309"
},
{
"trait_key": "type",
"trait_value": "user"
},
{
"trait_key": "email",
"trait_value": "68385f9726ad05c8e551a8d5be5cd8213f1e733346a9eb00e86f83df94639555"
},
{
"trait_key": "defaultTraitsUpdatedAt",
"trait_value": 1695316874
}
]
}'
To Reproduce
Steps to reproduce the behavior:
- Make a request from the above-shared curl with the env key we are using, you will be able to see 502.
- Now change the
identifierto any test value and API will work (no 502)
Expected behavior When we are sending the above payload with our env key, we expect it to return 200OK with the right response instead of a 502.
How are you running Flagsmith?
- SaaS at flagsmith.com
Additional context Discord conversation link - https://discord.com/channels/517647859495993347/917719343930957846/1154656436220076084
About this issue
- Original URL
- State: closed
- Created 9 months ago
- Comments: 26 (17 by maintainers)
Hi @NilanshBansal Just to add - we’re still actively working on this issue, trying to recreate it and understand how this data got to be in the state that was in. We’re not closing this ticket and will add detail as we find it.
It is already done for this identity
We are not sure yet because we can’t reproduce this
Not really, no. in fact, I would like you to do whatever you did earlier. See if you can reproduce it?
That’s the character limit for string we also support other data types
@vivonk we have removed the instaceID trait from
68385f9726ad05c8e551a8d5be5cd8213f1e733346a9eb00e86f83df94639555, you should be able to access it now@dabeeeenster @khvn26 we are using the Flagsmith Java SDK (v6.1.0). The method being invoked is
getIdentityFlags(identifier, traits)Ref: https://docs.flagsmith.com/clients/server-side#get-flags-for-an-identity
cc: @vivonk
@khvn26 thanks for sharing this. Let me check both things and get back to you by tomorrow morning IST time.