rond-authz/rond

Provide better error for unknown api if no API Spec is provided

Opened this issue · 0 comments

Describe the bug

When invoking an unknown API and no API Spec is provided the following error is returned to the user:

{"error":"error while parsing rowFilter.enabled: strconv.ParseBool: parsing \"\": invalid syntax","message":"The request doesn't match any known API","statusCode":403}

The message error while parsing rowFilter.enabled: strconv.ParseBool: parsing \"\": invalid syntax seems a lot like a technical error that shouldn't arrive to the final user

Expected behavior

A better error message that doesn't sound like a bug in the code

Replication info

  • Rönd version: latest (1.12.5)
  • Running mode: sidecar
  • policy type: none