debug: add SFTP message logging to diagnose empty directory listing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
9e30e5915f
commit
46e2cb6e2f
@ -24,8 +24,10 @@ export class SftpGateway {
|
|||||||
client.on('message', async (raw: Buffer) => {
|
client.on('message', async (raw: Buffer) => {
|
||||||
try {
|
try {
|
||||||
const msg = JSON.parse(raw.toString());
|
const msg = JSON.parse(raw.toString());
|
||||||
|
this.logger.log(`[SFTP] Message: ${msg.type} sessionId=${msg.sessionId} path=${msg.path || ''}`);
|
||||||
await this.handleMessage(client, msg);
|
await this.handleMessage(client, msg);
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
|
this.logger.error(`[SFTP] Error: ${err.message}`);
|
||||||
this.send(client, { type: 'error', message: err.message });
|
this.send(client, { type: 'error', message: err.message });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user