Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 4a448b29 authored by Jean Claude Correale's avatar Jean Claude Correale
Browse files

Merge branch 'hotfix' into 'main'

Hotfix

See merge request !254
parents 3e24c096 89d05092
No related branches found
No related tags found
2 merge requests!268Update 1.4.0,!254Hotfix
Pipeline #286822 passed with warnings
PROJECT_VERSION_NUMBER="1.2.0"
PROJECT_VERSION_NUMBER="1.2.1"
......@@ -13,11 +13,11 @@
<groupId>eu.europa.ec.simpl</groupId>
<artifactId>simpl-parent</artifactId>
<version>1.2.0</version>
<version>1.2.1</version>
<packaging>pom</packaging>
<properties>
<common.version>1.2.0</common.version>
<common.version>1.2.1</common.version>
<java.version>21</java.version>
<spring-cloud.version>2024.0.0</spring-cloud.version>
<mapstruct.version>1.6.3</mapstruct.version>
......
......@@ -6,7 +6,7 @@
<parent>
<groupId>eu.europa.ec.simpl</groupId>
<artifactId>simpl-parent</artifactId>
<version>1.2.0</version>
<version>1.2.1</version>
</parent>
<artifactId>simpl-api-iaa</artifactId>
......
......@@ -6,7 +6,7 @@
<parent>
<groupId>eu.europa.ec.simpl</groupId>
<artifactId>simpl-parent</artifactId>
<version>1.2.0</version>
<version>1.2.1</version>
</parent>
<artifactId>simpl-commons-data</artifactId>
......
......@@ -7,7 +7,7 @@
<parent>
<groupId>eu.europa.ec.simpl</groupId>
<artifactId>simpl-parent</artifactId>
<version>1.2.0</version>
<version>1.2.1</version>
</parent>
<artifactId>simpl-spring-boot-starter</artifactId>
......
......@@ -91,7 +91,8 @@ public class RestExceptionHandler extends ResponseEntityExceptionHandler {
public ResponseEntity<ProblemDetail> handleClientException(HttpStatusCodeException e) {
log.error("Client exception reported: ", e);
var cause = tryParseProblem(e).orElse(ProblemDetail.forStatusAndDetail(e.getStatusCode(), e.getMessage()));
return ResponseEntity.status(e.getStatusCode()).body(new ClientProblemDetail(cause));
var clientProblem = new ClientProblemDetail(cause);
return ResponseEntity.status(clientProblem.getStatus()).body(clientProblem);
}
private Optional<ProblemDetail> tryParseProblem(HttpStatusCodeException httpException) {
......
......@@ -13,7 +13,7 @@ import org.springframework.web.service.annotation.PostExchange;
public interface AuthorityExchange extends ParticipantExchange {
@GetExchange("/identity-api/v1/mtls/whoami")
@GetExchange("/identityApi/v1/mtls/whoami")
ParticipantDTO whoami();
@PostExchange("/identity-api/mtls/token")
......
......@@ -169,6 +169,8 @@ class RestExceptionHandlerTest {
var result = mvc.perform(get("/test")).andReturn();
var problem = objectMapper.readValue(result.getResponse().getContentAsString(), ClientProblemDetail.class);
assertThat(result.getResponse().getStatus()).isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR.value());
assertThat(problem.getType()).isEqualTo(CLIENT_ERROR_TYPE);
assertThat(problem.getStatus()).isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR.value());
......@@ -186,6 +188,8 @@ class RestExceptionHandlerTest {
var result = mvc.perform(get("/test")).andReturn();
var problem = objectMapper.readValue(result.getResponse().getContentAsString(), ClientProblemDetail.class);
assertThat(result.getResponse().getStatus()).isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR.value());
assertThat(problem.getType()).isEqualTo(CLIENT_ERROR_TYPE);
assertThat(problem.getStatus()).isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR.value());
......
......@@ -7,7 +7,7 @@
<parent>
<groupId>eu.europa.ec.simpl</groupId>
<artifactId>simpl-parent</artifactId>
<version>1.2.0</version>
<version>1.2.1</version>
</parent>
<artifactId>simpl-test-lib</artifactId>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment