Skip to content

Commit

Permalink
Merge pull request #1401 from argos-ci/optional-errors
Browse files Browse the repository at this point in the history
fix(api): mark error.details as optional
  • Loading branch information
gregberge authored Oct 21, 2024
2 parents 83daf0a + 3b7d9e5 commit 067d6f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/backend/src/api/schema/util/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { z } from "./zod.js";
const ErrorSchema = z
.object({
error: z.string(),
details: z.array(z.object({ message: z.string() })),
details: z.array(z.object({ message: z.string() })).optional(),
})
.openapi({
description: "Error response",
Expand Down
5 changes: 3 additions & 2 deletions apps/backend/src/util/redis/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { assertNever } from "@argos/util/assertNever";
import {
ConnectionTimeoutError,
createClient,
RedisClientType,
SocketClosedUnexpectedlyError,
} from "redis";

Expand All @@ -11,10 +12,10 @@ import logger from "@/logger/index.js";

import { createRedisLock } from "./lock.js";

export const redisClient = createClient({
export const redisClient: RedisClientType = createClient({
url: config.get("redis.url"),
socket: {
tls: config.get("redis.url").match(/rediss:/) != null,
tls: /rediss:/.test(config.get("redis.url")),
rejectUnauthorized: false,
},
});
Expand Down

0 comments on commit 067d6f8

Please sign in to comment.