mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-21 00:32:51 +02:00
BUGFIX: Fix inconsistencies of error handling in promise-based API (#1377)
This commit is contained in:
@@ -559,8 +559,7 @@ export function NetscriptSingularity(): InternalAPI<ISingularity> {
|
||||
helpers.checkSingularityAccess(ctx);
|
||||
const baseserver = Player.getCurrentServer();
|
||||
if (!(baseserver instanceof Server)) {
|
||||
helpers.log(ctx, () => "Cannot backdoor this kind of server");
|
||||
return Promise.resolve();
|
||||
throw helpers.errorMessage(ctx, "Cannot backdoor this kind of server.");
|
||||
}
|
||||
const server = baseserver;
|
||||
const installTime = (calculateHackingTime(server, Player) / 4) * 1000;
|
||||
|
||||
Reference in New Issue
Block a user