Skip to content

Commit

Permalink
improve error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
MineFact committed Jan 26, 2024
1 parent 6612095 commit 5809dda
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/struct/core/buildteam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ export default class BuildTeam {
await this.network.loadBuildTeamWarpGroups();

// Validate that all data is loaded
if(this.apiKey == null){
console.log("API Key is not set in loadBuildTeamInfo() for Team: " + this.buildTeamID)
return null;
}
if(this.network.buildTeamInfo == null){
console.log("Build Team Info could not be loaded in loadBuildTeamInfo().")
return null;
Expand All @@ -167,7 +171,7 @@ export default class BuildTeam {
const info = this.network.buildTeamInfo.filter((info: any) => info.APIKey == this.apiKey)[0];

if(info == null){
console.log("Build Team Info could not be found by API Key in loadBuildTeamInfo(). Provided API Key:" + this.apiKey + " | Number of Entries in BuildTeamInfo: " + this.network.buildTeamInfo.length)
console.log("Build Team Info could not be found by API Key in loadBuildTeamInfo(). Number of Entries in BuildTeamInfo: " + this.network.buildTeamInfo.length)
return null;
}

Expand Down

0 comments on commit 5809dda

Please sign in to comment.