Adjust exception reporter on API errors #512

Open
opened 2025-12-11 18:11:16 +01:00 by mpeltriaux · 0 comments
Owner

Status quo

Somewhere an uncaught exception on the api view results on a not very specific error mail, e.g.:



Internal Server Error: /api/v1/compensation/

Report at /api/v1/compensation/
Internal Server Error: /api/v1/compensation/

Request Method: POST
Request URL: 
Django Version: 
Python Executable: /usr/local/bin/python3.11
Python Version: 3.11.11
Python Path: 
Server time: 
Installed Applications:
''
Installed Middleware:
''


Traceback (most recent call last):
  None


Raised during: api.views.v1.views.CompensationAPIViewV1
Request information:
USER: XXXXXX

GET: No GET data

POST: No POST data

FILES: No FILES data

COOKIES: No cookie data

META:

Settings:
Using settings module 



Sadly, the POST body is not properly parsed into the sent information. The reason for that is, that only form-urlencoded post values seems to be properly filtered and pasted into the html template which results in this mail.

Not long ago we had a fix for that issue on schneider. You may take a look on the implementation as reference: 7a6160a1f4 (diff-260f051245e98dc51ead510f2cb101bc64709c25)

ToDo

I want the exception reporter for konova to properly parse any post body content and paste it as body into the filtered post items, from which the exception mail is generated.

# Status quo Somewhere an uncaught exception on the api view results on a not very specific error mail, e.g.: ```python Internal Server Error: /api/v1/compensation/ Report at /api/v1/compensation/ Internal Server Error: /api/v1/compensation/ Request Method: POST Request URL: Django Version: Python Executable: /usr/local/bin/python3.11 Python Version: 3.11.11 Python Path: Server time: Installed Applications: '' Installed Middleware: '' Traceback (most recent call last): None Raised during: api.views.v1.views.CompensationAPIViewV1 Request information: USER: XXXXXX GET: No GET data POST: No POST data FILES: No FILES data COOKIES: No cookie data META: Settings: Using settings module ``` Sadly, the POST body is not properly parsed into the sent information. The reason for that is, that only form-urlencoded post values seems to be properly filtered and pasted into the html template which results in this mail. Not long ago we had a fix for that issue on schneider. You may take a look on the implementation as reference: https://git.naturschutz.rlp.de/IT-Naturschutz/schneider/commit/7a6160a1f4a748d60e4b5eb77c9a40201ae2f6b4#diff-260f051245e98dc51ead510f2cb101bc64709c25 # ToDo I want the exception reporter for konova to properly parse any post body content and paste it as `body` into the filtered post items, from which the exception mail is generated.
mpeltriaux added the
enhancement
label 2025-12-11 18:11:16 +01:00
mpeltriaux self-assigned this 2025-12-11 18:11:16 +01:00
Sign in to join this conversation.
No description provided.