mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 05:27:52 +00:00
feat: added a catch and override error message for ping check
This commit is contained in:
@@ -140,17 +140,21 @@ export const auditLogStreamServiceFactory = ({
|
|||||||
streamHeaders[key] = value;
|
streamHeaders[key] = value;
|
||||||
});
|
});
|
||||||
|
|
||||||
await request.post(
|
await request
|
||||||
url || logStream.url,
|
.post(
|
||||||
{ ping: "ok" },
|
url || logStream.url,
|
||||||
{
|
{ ping: "ok" },
|
||||||
headers: streamHeaders,
|
{
|
||||||
// request timeout
|
headers: streamHeaders,
|
||||||
timeout: AUDIT_LOG_STREAM_TIMEOUT,
|
// request timeout
|
||||||
// connection timeout
|
timeout: AUDIT_LOG_STREAM_TIMEOUT,
|
||||||
signal: AbortSignal.timeout(AUDIT_LOG_STREAM_TIMEOUT)
|
// connection timeout
|
||||||
}
|
signal: AbortSignal.timeout(AUDIT_LOG_STREAM_TIMEOUT)
|
||||||
);
|
}
|
||||||
|
)
|
||||||
|
.catch((err) => {
|
||||||
|
throw new Error(`Failed to connect with the source ${(err as Error)?.message}`);
|
||||||
|
});
|
||||||
|
|
||||||
const encryptedHeaders = headers ? infisicalSymmetricEncypt(JSON.stringify(headers)) : undefined;
|
const encryptedHeaders = headers ? infisicalSymmetricEncypt(JSON.stringify(headers)) : undefined;
|
||||||
const updatedLogStream = await auditLogStreamDAL.updateById(id, {
|
const updatedLogStream = await auditLogStreamDAL.updateById(id, {
|
||||||
|
|||||||
Reference in New Issue
Block a user