File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,10 @@ def replace(match):
7070 raw_str = match .group (1 )
7171 param_name = raw_str .split (":" )[0 ] # Ignore :converter in the field
7272 if param_name not in kwargs :
73- message = f"Missing path parameter: { param_name } "
73+ message = (
74+ f"Error constructing URL for { path_template !r} ; "
75+ f"missing path parameter { param_name !r} "
76+ )
7477 logger .error (message )
7578 raise KeyError (message )
7679 return str (kwargs [param_name ])
@@ -112,15 +115,19 @@ def url_path_for(
112115 param_name = path_param ["name" ]
113116 param_type = path_param ["type" ]
114117 if param_name not in kwargs .keys ():
115- message = f"Path param { param_name !r} was not provided"
118+ message = (
119+ f"Error validating parameters for { function_name } ; "
120+ f"path parameter { param_name !r} was not provided"
121+ )
116122 logger .error (message )
117123 raise KeyError (message )
118124 # Skip complicated type resolution for now
119125 if param_type .startswith ("typing." ):
120126 continue
121127 elif type (kwargs [param_name ]).__name__ not in param_type :
122128 message = (
123- f"{ param_name !r} must be { param_type !r} ; "
129+ f"Error validating parameters for { function_name } ; "
130+ f"{ param_name !r} must be { param_type !r} , "
124131 f"received { type (kwargs [param_name ]).__name__ !r} "
125132 )
126133 logger .error (message )
You can’t perform that action at this time.
0 commit comments