Commits

Sebastian Sdorra committed 3c6b5a2

use status code 412 for failed plugin conditions

Comments (0)

Files changed (1)

scm-webapp/src/main/java/sonia/scm/api/rest/resources/PluginResource.java

    * <br />
    * <ul>
    *   <li>200 success</li>
-   *   <li>412 conflict</li>
+   *   <li>412 precondition failed</li>
    *   <li>500 internal server error</li>
    * </ul>
    *
     {
       logger.warn(
         "could not install plugin package, because the condition failed", ex);
-      response = Response.status(Status.CONFLICT).entity(
+      response = Response.status(Status.PRECONDITION_FAILED).entity(
         new RestActionResult(false)).build();
     }
     catch (Exception ex)
    * <br />
    * <ul>
    *   <li>200 success</li>
-   *   <li>412 conflict</li>
+   *   <li>412 precondition failed</li>
    *   <li>500 internal server error</li>
    * </ul>
    *