Skip to content

Commit

Permalink
fix: allow status code 201 when dropping a repository
Browse files Browse the repository at this point in the history
  • Loading branch information
DanySK committed Jan 11, 2023
1 parent 6a5154d commit bd87a1c
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,12 @@ data class NexusStatefulOperation(
.jsonBody("""{"data":{"stagedRepositoryIds":["$repoId"],"description":"$description"}}""")
.response { _, response, _ ->
project.logger.lifecycle("Received response {} ", response)
check(response.statusCode == HttpStatusCodes.STATUS_CODE_OK)
check(
response.statusCode in listOf(
HttpStatusCodes.STATUS_CODE_OK,
HttpStatusCodes.STATUS_CODE_CREATED,
)
)
}
}
project.logger.lifecycle("Requested drop for repository {} ", repoId)
Expand Down

0 comments on commit bd87a1c

Please sign in to comment.