fix: throw on errors in api tier rewards
This commit is contained in:
@@ -97,6 +97,8 @@ const getAllCachedApiRewards = unstable_cache(
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
|
throw apiResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
const data = await apiResponse.json()
|
const data = await apiResponse.json()
|
||||||
@@ -114,7 +116,7 @@ const getAllCachedApiRewards = unstable_cache(
|
|||||||
error: validatedApiTierRewards.error,
|
error: validatedApiTierRewards.error,
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
return null
|
throw validatedApiTierRewards.error
|
||||||
}
|
}
|
||||||
|
|
||||||
return validatedApiTierRewards.data
|
return validatedApiTierRewards.data
|
||||||
|
|||||||
Reference in New Issue
Block a user