Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
camden11 committed Jan 10, 2025
1 parent 8a7e43c commit 0daf6ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion commands/sandbox/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ exports.handler = async options => {

// Check usage limits and exit if parent portal has no available sandboxes for the selected type
try {
console.log('validate usage limit');
await validateSandboxUsageLimits(accountConfig, sandboxType, env);
} catch (err) {
if (isMissingScopeError(err)) {
Expand Down
4 changes: 2 additions & 2 deletions lib/sandboxes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,14 @@ export async function validateSandboxUsageLimits(
const accountId = getAccountId(id);

if (!accountId) {
throw new Error(`${i18nKey}.create.failure.usageLimitFetch`);
throw new Error(i18n(`${i18nKey}.create.failure.usageLimitFetch`));
}

const {
data: { usage },
} = await getSandboxUsageLimits(accountId);
if (!usage) {
throw new Error(`${i18nKey}.create.failure.usageLimitFetch`);
throw new Error(i18n(`${i18nKey}.create.failure.usageLimitFetch`));
}
if (sandboxType === HUBSPOT_ACCOUNT_TYPES.DEVELOPMENT_SANDBOX) {
if (usage['DEVELOPER'].available === 0) {
Expand Down

0 comments on commit 0daf6ac

Please sign in to comment.