Skip to content

Fix coordinate validation error handling #252

Description

@gita-agents

check_point_in_critical_areas at backend/app/api/critical_sectors/routes.py:195 converts x and y to float without try/except, causing unhandled ValueError and 500 errors on malformed input like 'abc'. Wrap conversion in try/except and return 400 with clear error message.

Files to modify: backend/app/api/critical_sectors/routes.py

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions