Esempio n. 1
0
 def __call__(self, request, trace):
     params = self.params(request)
     try:
         result = validate(self.schema, params)
     except ValidationError as e:
         raise HTTPBadRequest(e.error)
     else:
         self.update_trace(trace, result)
     return trace
Esempio n. 2
0
 def __call__(self, request, trace):
     params = self.params(request)
     try:
         result = validate(self.schema, params)
     except ValidationError as e:
         raise HTTPBadRequest(e.error)
     else:
         self.update_trace(trace, result)
     return trace