# 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:
@@ -81,9 +81,7 @@ class AbstractAPIView(View):
|
||||
Returns:
|
||||
|
||||
"""
|
||||
content = [error.__str__()]
|
||||
if hasattr(error, "messages"):
|
||||
content = error.messages
|
||||
content = [f"{error.__class__.__name__}: {str(error)}"]
|
||||
return JsonResponse(
|
||||
{
|
||||
"errors": content
|
||||
|
||||
Reference in New Issue
Block a user