Change error text
This commit is contained in:
@@ -173,7 +173,6 @@ fun Application.module(env: Env = PROD) {
|
||||
}
|
||||
|
||||
install(StatusPages) {
|
||||
// TODO move to postgresJson lib
|
||||
exception<CompletionException> { e ->
|
||||
val parent = e.cause?.cause
|
||||
if (parent is GenericDatabaseException) {
|
||||
@@ -199,8 +198,11 @@ fun Application.module(env: Env = PROD) {
|
||||
method(HttpMethod.Put)
|
||||
method(HttpMethod.Delete)
|
||||
header(HttpHeaders.Authorization)
|
||||
if (env == PROD) {
|
||||
host("localhost:4200", schemes = listOf("http", "https"))
|
||||
} else {
|
||||
anyHost()
|
||||
// host("localhost:4200", schemes = listOf("http", "https"))
|
||||
}
|
||||
allowCredentials = true
|
||||
allowSameOrigin = true
|
||||
maxAge = Duration.ofDays(1)
|
||||
|
||||
@@ -37,8 +37,8 @@ class NotificationsPush private constructor(
|
||||
) {
|
||||
class Builder(val redisClient: RedisClient) {
|
||||
private val redisConnection = redisClient.connect() ?: error("Unable to connect to redis")
|
||||
private val redisConnectionPubSub = redisClient.connectPubSub() ?: error("Unable to connect to redis")
|
||||
private val redis: RedisAsyncCommands<String, String> = redisConnection.async() ?: error("Unable to connect to redis")
|
||||
private val redisConnectionPubSub = redisClient.connectPubSub() ?: error("Unable to connect to redis PubSub")
|
||||
private val redis: RedisAsyncCommands<String, String> = redisConnection.async() ?: error("Unable to connect to redis Async")
|
||||
|
||||
fun build(
|
||||
citizen: CitizenI,
|
||||
@@ -93,7 +93,7 @@ class NotificationsPush private constructor(
|
||||
addListener(listener)
|
||||
|
||||
/* Register to the events */
|
||||
async()?.psubscribe("__key*__:$key") ?: error("Unable to connect to redis")
|
||||
async()?.psubscribe("__key*__:$key") ?: error("Unable to subscribe to redis events")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user