Skip to content

Commit 7cbdf46

Browse files
author
Joerg Huber
committed
Return correct HTTP status (FORBIDDEN) for some methods.
1 parent c43d67d commit 7cbdf46

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/resource/JobResource.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ public Response updateJob(String payload, @PathParam("jobID") String jobID, @Pat
490490
logger.debug("Update Single Job "+getJobNamePlural()+" (REST PUT) for Job with ID = "+jobID+", URL Postfix mimeType = "+mimeType+"' and input data: " + payload);
491491
}
492492

493-
ErrorDetails error = new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "The Job Object cannot be updated.", "Use updates to Phases or Status of a Job instead.");
493+
ErrorDetails error = new ErrorDetails(Status.FORBIDDEN.getStatusCode(), "The Job Object cannot be updated.", "Use updates to Phases or Status of a Job instead.");
494494
return makeErrorResponse(error, ResponseAction.UPDATE, getInitialCustomResponseParameters());
495495
}
496496

@@ -508,7 +508,7 @@ public Response updateJobs(String deletePayload)
508508
}
509509
else
510510
{
511-
ErrorDetails error = new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "The Job Objects cannot be updated.", "Use updates to Phases or Status of Job(s) instead.");
511+
ErrorDetails error = new ErrorDetails(Status.FORBIDDEN.getStatusCode(), "The Job Objects cannot be updated.", "Use updates to Phases or Status of Job(s) instead.");
512512
return makeErrorResponse(error, ResponseAction.UPDATE, getInitialCustomResponseParameters());
513513
}
514514
}

0 commit comments

Comments
 (0)