Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect status code in POST /artifacts/{parentId} endpoint #3374

Open
Celiant opened this issue Mar 25, 2024 · 0 comments
Open

Incorrect status code in POST /artifacts/{parentId} endpoint #3374

Celiant opened this issue Mar 25, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Celiant
Copy link
Collaborator

Celiant commented Mar 25, 2024

Problem description

In case when user sends broken body for /artifacts/{parentId} endpoint(for example valid file without "artifacts" key) he get 201 status code(success)
Also, if user sends invalid parentId he can't see that something wrong with parentId

Step to reproduce

Steps to reproduce the behavior:

  1. Create request to /artifacts/{parentId}
  2. In body don't use "artifacts" key in formdata
  3. Use wrong parentId(optionally)
  4. Send request

Expected behavior

422 status code with "There are no files to upload" message(body without "artifacts" key)
422 status code with "There is no appropriate policy or policy is not in DRAFT status" message(invalid parentId)

Screenshots

If applicable, add screenshots to help explain your problem.

@Celiant Celiant added the bug Something isn't working label Mar 25, 2024
@prernaadev01 prernaadev01 removed their assignment Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants