mirror of
https://github.com/outline/outline.git
synced 2026-01-06 11:09:55 -06:00
chore: Add more descriptive error for missing file system permission
This commit is contained in:
@@ -47,7 +47,16 @@ router.post(
|
||||
throw AuthorizationError("Invalid key");
|
||||
}
|
||||
|
||||
await attachment.writeFile(file);
|
||||
try {
|
||||
await attachment.writeFile(file);
|
||||
} catch (err) {
|
||||
if (err.message.includes("permission denied")) {
|
||||
throw Error(
|
||||
`Permission denied writing to "${key}". Check the host machine file system permissions.`
|
||||
);
|
||||
}
|
||||
throw err;
|
||||
}
|
||||
|
||||
ctx.body = {
|
||||
success: true,
|
||||
|
||||
Reference in New Issue
Block a user