Skip to content

Bug: Flagsmith returning 502 on /identities API #2806

@vivonk

Description

@vivonk

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:

  1. Make a request from the above-shared curl with the env key we are using, you will be able to see 502.
  2. Now change the identifier to 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

Metadata

Metadata

Labels

bugSomething isn't workingedge-apiRelated to edge.api.flagsmith.com

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions