Skip to content

Fix unsafe URL parsing #307

@jankovicivana

Description

@jankovicivana

Location: UrlDetector.scala:42

AbsoluteUrl.parse() is used inside a .map, which can throw exceptions on invalid URLs. This violates our FP/no-throw guidelines and can cause unexpected crashes:

  • Function is not total (can fail unexpectedly)
  • Breaks referential transparency
  • Uncaught exceptions in .map() will crash the application

To-Do

  • Replace any usage of AbsoluteUrl.parse(...) (which can throw exceptions) with a safe alternative
  • Add tests for invalid URLs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions