Skip to content

Commit

Permalink
path.data: throw error if can not make dir
Browse files Browse the repository at this point in the history
  • Loading branch information
tsullivan committed Sep 8, 2016
1 parent 4fc9f35 commit 3c598b0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/core_plugins/kibana/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ module.exports = function (kibana) {
await mkdirp(server.config().get('path.data'));
} catch (err) {
server.log(['error', 'init'], err);
// Stop the server startup with a fatal error
throw err;
}
},

Expand Down
5 changes: 4 additions & 1 deletion src/core_plugins/kibana/server/lib/manage_uuid.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ export default async function manageUuid(server) {
return false;
}
server.log(['error', 'read-uuid'], err);
// Note: this will most likely be logged as an Unhandled Rejection
throw err;
}
}

Expand All @@ -30,7 +32,8 @@ export default async function manageUuid(server) {
return await writeFile(uuidFile, uuid, { encoding: FILE_ENCODING });
} catch (err) {
server.log(['error', 'write-uuid'], err);
return false;
// Note: this will most likely be logged as an Unhandled Rejection
throw err;
}
}

Expand Down

0 comments on commit 3c598b0

Please sign in to comment.