RED-5293: 500 for invalid tenant

This commit is contained in:
Ali Oezyetimoglu 2022-10-28 16:46:36 +02:00
parent a9f4c5f31f
commit 5ed2579362
4 changed files with 15 additions and 10 deletions

View File

@ -56,22 +56,22 @@
<!-- spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
<scope>compile</scope>
</dependency>
<!-- test -->
<dependency>
<groupId>com.iqser.red.commons</groupId>
<artifactId>jackson-commons</artifactId>
</dependency>
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
<version>2.0.2</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>

View File

@ -125,6 +125,10 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.iqser.red.commons</groupId>
<artifactId>spring-boot-starter-web-custom-commons</artifactId>

View File

@ -64,7 +64,7 @@ public class TenantManagementService {
DataSource tenantDataSource = new SingleConnectionDataSource(connection, false);
runLiquibase(tenantDataSource);
} catch (PSQLException e) {
throw new BadRequestException("Could not connect to datbase", e);
throw new BadRequestException("Could not connect to database", e);
}
TenantEntity tenantEntity = TenantEntity.builder()

View File

@ -68,6 +68,7 @@
</dependency>
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>