fix: throw on errors in api tier rewards

This commit is contained in:
Michael Zetterberg
2024-10-16 07:30:04 +02:00
parent 4a846540c3
commit 55df33d26c

View File

@@ -97,6 +97,8 @@ const getAllCachedApiRewards = unstable_cache(
},
})
)
throw apiResponse
}
const data = await apiResponse.json()
@@ -114,7 +116,7 @@ const getAllCachedApiRewards = unstable_cache(
error: validatedApiTierRewards.error,
})
)
return null
throw validatedApiTierRewards.error
}
return validatedApiTierRewards.data