Skip to content

Commit

Permalink
fix to display more meaningful message when authorized accessing of g…
Browse files Browse the repository at this point in the history
…ame happens
  • Loading branch information
xmliszt committed Jan 28, 2024
1 parent 98c03d6 commit d9c5bd1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/result/server/fetch-game.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ export const fetchGame = async (gameId: string) => {
'*,scores:game_scores(*,conversations:game_score_conversations!inner(*),highlights:game_score_highlights!inner(*),ai_evaluation:game_ai_evaluations!inner(*),words!inner(*))'
)
.eq('id', gameId)
.single();
.maybeSingle();
if (fetchGameResponse.error) throw fetchGameResponse.error;
if (!fetchGameResponse.data) throw new Error('Game not found');
const game = fetchGameResponse.data;
const fetchGameLevelInfoResponse = await supabaseClient
.from('v_game_level_info')
Expand Down

0 comments on commit d9c5bd1

Please sign in to comment.