Flagsmith / Flagsmith/flagsmith

API crash because of bad URL parameters

Open
#7,361 1 comment 0 reactions 0 assignees View on GitHub
good first issue improvement
Dominant language
Python
Stars
6.6k
Forks
567
Avg merge
1d 13h
Merged PRs (30d)
121

Description

## Acceptance criteria

- [ ] URL matching or view logic prevents an error with a proper 4xx response.

---

Sentry Issue: [FLAGSMITH-API-5NF](https://flagsmith.sentry.io/issues/7447801569/?referrer=github_integration)

```
ValueError: invalid literal for int() with base 10: 'org_3COWhASRXfhcdxVrd0wEjpQp4dg'
File "django/db/models/fields/__init__.py", line 2128, in get_prep_value
return int(value)

ValueError: Field 'id' expected a number but got 'org_3COWhASRXfhcdxVrd0wEjpQp4dg'.
(17 additional frame(s) were not displayed)
...
File "features/views.py", line 861, in get_queryset
return super().get_queryset().filter(identity__pk=self.kwargs["identity_pk"]) # type: ignore[no-untyped-call]
```

Contributes to #6809

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.