frontier icon indicating copy to clipboard operation
frontier copied to clipboard

Shield Server API response not returning a proper status code

Open mabdh opened this issue 3 years ago • 0 comments

Describe the bug There are several improper status code return by shield server API

To Reproduce

  • Create user that already exist with POST /admin/v1beta1/users return 500
  • Create a project without org_id in its body with POST /admin/v1beta1/projects return 500

Expected behavior API status code should return error properly and not return 500 for every call. e.g.

  • If we create user that already exist with POST /admin/v1beta1/users better to return 4xx (409 or 400) instead of returning 500. Or we can make it idempotent.
  • If we create a project without org_id in its body with POST /admin/v1beta1/projects, that should return 400. instead of returning 500

mabdh avatar Jul 22 '22 07:07 mabdh