Try to associate a tag to a set of components in a repository that does not exist. The response body is not JSON, but the response status code is 404.
Try to associate a tag to a set of components in a repository that does exist, but the other search criteria do not match a valid component. The response body is JSON:
And the status code is 404.
The API documentation states that 404 status code is returned when components or repository is not found.
A REST API should return JSON with error details to help the caller understand problems, especially when the same error status code can be returned in multiple situations.
When a repository name is specified that is not valid, then the response body should contain JSON explaining the cause of the 404.