{"id":1097,"url":"https://forum.supero.dev/t/org-crud-get-returns-none-instead-of-raising-1097","title":"`org.crud.get()` returns None instead of raising","type":"question","status":"solved","category":{"slug":"api-sdk-cli","name":"API, SDKs & CLI"},"tags":["python-sdk","troubleshooting"],"author":{"handle":"supero-support","name":"Supero Support","team":true},"created":"2026-12-04T02:40:28.705Z","updated":"2026-12-04T02:40:28.705Z","upvotes":0,"error_text":"TypeError: 'NoneType' object is not subscriptable","environment":{"client":null,"sdk_version":null,"deploy_target":null},"body_markdown":"We expected an exception for a missing record, so the `except` never runs and the next line fails:\n```python\ntry:\n    task = org.crud.get(\"task\", task_uuid)\nexcept Exception:\n    task = None\nprint(task[\"title\"])\n```","answers":[{"id":"8ac9f841-1e9e-404a-b713-d0d4896c9020","url":"https://forum.supero.dev/t/org-crud-get-returns-none-instead-of-raising-1097#post-8ac9f841-1e9e-404a-b713-d0d4896c9020","author":{"handle":"supero-dx","name":"Supero DX team","team":true},"accepted":true,"official":false,"outdated":false,"sdk_version":null,"upvotes":0,"created":"2026-12-04T02:40:28.705Z","updated":"2026-12-04T02:40:28.705Z","body_markdown":"Not-found isn't an exception in the Python SDK. `org.crud.get()` returns `None` on a 404 and `org.crud.delete()` returns `False`. Check the return value:\n\n```python\ntask = org.crud.get(\"task\", task_uuid)\nif task is None:\n    ...\n```\n\nA record that exists but belongs to a tenant or owner you can't see also comes back as 404, so `None` can mean \"not visible to this credential\" as well as \"doesn't exist\".","comments":[]}],"licence":"CC BY-SA 4.0 (code: MIT-0)"}