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 --> <!-- spring -->
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-web</artifactId> <artifactId>spring-boot-starter-web</artifactId>
<scope>compile</scope>
</dependency> </dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
<scope>compile</scope>
</dependency>
<!-- test --> <!-- test -->
<dependency> <dependency>
<groupId>com.iqser.red.commons</groupId> <groupId>com.iqser.red.commons</groupId>
<artifactId>jackson-commons</artifactId> <artifactId>jackson-commons</artifactId>
</dependency> </dependency>
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
<version>2.0.2</version>
<scope>compile</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>

View File

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

View File

@ -64,7 +64,7 @@ public class TenantManagementService {
DataSource tenantDataSource = new SingleConnectionDataSource(connection, false); DataSource tenantDataSource = new SingleConnectionDataSource(connection, false);
runLiquibase(tenantDataSource); runLiquibase(tenantDataSource);
} catch (PSQLException e) { } 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() TenantEntity tenantEntity = TenantEntity.builder()

View File

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