# Improve exception reporting for API
* fixes typo in exception_reporter.py * properly catches error on geometry cast into multipolygon if input are no valid polygons * extends error response on malicious api calls * specifies different exceptions on try-catch while initializing api data
This commit is contained in:
@@ -71,7 +71,7 @@ class APIV1CreateTestCase(BaseAPIV1TestCase):
|
||||
# Expect this first request to fail, since user has no shared access on the intervention, we want to create
|
||||
# a compensation for
|
||||
response = self._run_create_request(url, post_body)
|
||||
self.assertEqual(response.status_code, 500, msg=response.content)
|
||||
self.assertEqual(response.status_code, 400, msg=response.content)
|
||||
content = json.loads(response.content)
|
||||
self.assertGreater(len(content.get("errors", [])), 0, msg=response.content)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user