Api empty project snippets
What does this MR do?
Ensures that code content is not empty. The PUT
request returned a 500 error if code
was empty. The POST
endpoint worked differently: here a validation in the model catched the error. However, I added a validation in the API to unify the error message (error code is still the same: 400
).
What are the relevant issue numbers?
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/50270
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary - [-] Documentation created/updated
-
Tests added for this feature/bug -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides - [-] Conforms to the database guides