File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -173,16 +173,14 @@ async def get_custom_rewards(
173173 return self ._cached_rewards [1 ]
174174 try :
175175 data = await self ._http .get_rewards (token , self .id , only_manageable , ids )
176- except Unauthorized as error :
177- raise Unauthorized ("The given token is invalid" , "" , 401 ) from error
178176 except HTTPException as error :
179177 status = error .args [2 ]
180178 if status == 403 :
181179 raise HTTPException (
182180 "The custom reward was created by a different application, or channel points are "
183181 "not available for the broadcaster (403)" ,
184- error .args [1 ],
185- 403 ,
182+ reason = error .args [1 ],
183+ status = 403 ,
186184 ) from error
187185 raise
188186 else :
@@ -249,16 +247,14 @@ async def create_custom_reward(
249247 redemptions_skip_queue ,
250248 )
251249 return CustomReward (self ._http , data [0 ], self )
252- except Unauthorized as error :
253- raise Unauthorized ("The given token is invalid" , "" , 401 ) from error
254250 except HTTPException as error :
255251 status = error .args [2 ]
256252 if status == 403 :
257253 raise HTTPException (
258254 "The custom reward was created by a different application, or channel points are "
259255 "not available for the broadcaster (403)" ,
260- error .args [1 ],
261- 403 ,
256+ reason = error .args [1 ],
257+ status = 403 ,
262258 ) from error
263259 raise
264260
You can’t perform that action at this time.
0 commit comments