frontier
frontier copied to clipboard
Shield Server API response not returning a proper status code
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/usersreturn 500 - Create a project without
org_idin its body withPOST /admin/v1beta1/projectsreturn 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/usersbetter to return 4xx (409 or 400) instead of returning 500. Or we can make it idempotent. - If we create a project without
org_idin its body withPOST /admin/v1beta1/projects, that should return 400. instead of returning 500