lakeFS: API with an unknown path should return an error

Currently lakeFS register openapi handlers and handle all specific routes. In case of a call to /api/v1/test, the unknown path under the API prefix, the mux will serve the request by the UI handler and return a valid HTML (UI) page.

The expected behaviour is to return a non-2xx status code with JSON error - prefered the internal error format, so the developer will handle an error and not fail to parse the response in case of a bad API call.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 25 (25 by maintainers)

Commits related to this issue

Most upvoted comments

Thank you for the info and help @nopcoder !!! I’ll try and get this finalized tonight/tomorrow. If I still don’t have something PR ready I’ll hold off to avoid delaying this getting in the next release.

Thanks again!!

dd

hey @nopcoder sorry for the delayed response. Was very busy over weekend so didn’t get to touch/look at the code, but I should tonight. I’ll let ya know how it goes.

Thanks again for helping me debug!