fix(server): ドライブ容量超過時のエラーが適切にレスポンスされない問題を修正

Fix #9550
This commit is contained in:
syuilo 2023-01-14 13:41:53 +09:00
parent c730973294
commit d52f0617a1
2 changed files with 5 additions and 4 deletions

View file

@ -90,7 +90,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
}
}
const meta = await this.metaService.fetch();
const instance = await this.metaService.fetch();
try {
// Create file
@ -102,8 +102,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
folderId: ps.folderId,
force: ps.force,
sensitive: ps.isSensitive,
requestIp: meta.enableIpLogging ? ip : null,
requestHeaders: meta.enableIpLogging ? headers : null,
requestIp: instance.enableIpLogging ? ip : null,
requestHeaders: instance.enableIpLogging ? headers : null,
});
return await this.driveFileEntityService.pack(driveFile, { self: true });
} catch (err) {
@ -116,7 +116,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
}
throw new ApiError();
} finally {
cleanup!();
cleanup!();
}
});
}