Skip to content
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

500 error on tokens page #23

Closed
simonw opened this issue Jan 10, 2024 · 3 comments
Closed

500 error on tokens page #23

simonw opened this issue Jan 10, 2024 · 3 comments
Labels
bug Something isn't working
Milestone

Comments

@simonw
Copy link
Owner

simonw commented Jan 10, 2024

CleanShot 2024-01-10 at 11 07 00@2x

Caused by:

@simonw simonw added the bug Something isn't working label Jan 10, 2024
@simonw
Copy link
Owner Author

simonw commented Jan 10, 2024

Sentry error:

CleanShot 2024-01-10 at 11 09 16@2x

So the code is question is here:

for token in tokens:
actor = actors.get(token["actor_id"])
token["actor"] = actor
token["actor_display"] = display_actor(actor)

And maybe:

actors = await datasette.actors_from_ids([row["actor_id"]])
actor_display = None
if actors and row["actor_id"] in actors:
actor_display = display_actor(actors[row["actor_id"]])

@simonw
Copy link
Owner Author

simonw commented Jan 10, 2024

This is more of a Datasette Cloud bug: in this case the actor ID being retrieved was for a user account that wasn't a member of the current space, so that space was not including that actor ID in the returned list.

@simonw simonw closed this as completed in 5f2c3c1 Jan 10, 2024
simonw added a commit that referenced this issue Jan 10, 2024
@simonw
Copy link
Owner Author

simonw commented Jan 10, 2024

Confirmed fixed on Datasette Cloud.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant