First set of updates from the major "backendification" rewrite #1
| @ -31,6 +31,6 @@ def rpc_roll_dice(request): | |||||||
|         result_str = roller.do_roll(dice_str) |         result_str = roller.do_roll(dice_str) | ||||||
|         return Response({'dice': dice_str, 'result': result_str}) |         return Response({'dice': dice_str, 'result': result_str}) | ||||||
|     except AssertionError as aex: |     except AssertionError as aex: | ||||||
|         return Response({'detail': f"Could not roll dice: {aex}"}, status=400) |         return Response({'detail': f"Could not roll dice: {aex}", 'dice': dice_str}, status=400) | ||||||
|     except ValueError: |     except ValueError: | ||||||
|         return Response({'detail': f"Could not parse requested dice '{dice_str}'."}, status=400) |         return Response({'detail': f"Could not parse requested dice '{dice_str}'.", 'dice': dice_str}, status=400) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user