fix: resolve lint errors - unused parameters and type safety
This commit is contained in:
parent
0639c7bf1f
commit
a4cccc2231
1
openclaw
Submodule
1
openclaw
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 0639c7bf1f37bafeb847afc9e422f05f3bb084a3
|
||||
@ -10,8 +10,9 @@ export async function writeOAuthCredentials(
|
||||
agentDir?: string,
|
||||
): Promise<void> {
|
||||
// Write to resolved agent dir so gateway finds credentials on startup.
|
||||
const emailStr = typeof creds.email === "string" ? creds.email : "default";
|
||||
upsertAuthProfile({
|
||||
profileId: `${provider}:${creds.email ?? "default"}`,
|
||||
profileId: `${provider}:${emailStr}`,
|
||||
credential: {
|
||||
type: "oauth",
|
||||
provider,
|
||||
|
||||
@ -150,7 +150,7 @@ export async function startGatewayServer(
|
||||
): Promise<GatewayServer> {
|
||||
// Install global unhandled rejection handler to prevent gateway crashes
|
||||
// from background promises (e.g., Telegram polling, network operations)
|
||||
const handleUnhandledRejection = (reason: unknown, promise: Promise<unknown>) => {
|
||||
const handleUnhandledRejection = (reason: unknown, _promise: Promise<unknown>) => {
|
||||
const formatted = reason instanceof Error ? reason.message : String(reason);
|
||||
log.error(`unhandled promise rejection: ${formatted}`);
|
||||
// Log additional details for debugging
|
||||
@ -587,7 +587,7 @@ export async function startGatewayServer(
|
||||
close: async (opts) => {
|
||||
// Remove unhandled rejection handler on shutdown
|
||||
process.off("unhandledRejection", handleUnhandledRejection);
|
||||
|
||||
|
||||
if (diagnosticsEnabled) {
|
||||
stopDiagnosticHeartbeat();
|
||||
}
|
||||
|
||||
@ -202,7 +202,7 @@ export async function monitorTelegramProvider(opts: MonitorTelegramOpts = {}) {
|
||||
// Ensure runner is stopped to prevent lingering promises
|
||||
try {
|
||||
await runner.stop();
|
||||
} catch (stopErr) {
|
||||
} catch {
|
||||
// Suppress errors from runner.stop() in finally block
|
||||
// (already logged by stopOnAbort if abort-triggered)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user