Skip to content

Commit

Permalink
fixed typo, env, and err msg
Browse files Browse the repository at this point in the history
  • Loading branch information
zhukaihan committed Jul 13, 2024
1 parent 14e2004 commit 8ea58b9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion packages/node/src/local/cohort/cohort-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ export class SdkCohortApi implements CohortApi {
} else if (response.status == 413) {
throw Error(`Cohort error response: size > ${options.maxCohortSize}`);
} else {
throw Error(`Cohort error resposne: status=${response.status}`);
throw Error(
`Cohort error response: status ${response.status}, body ${response.body}`,
);
}
}
}
2 changes: 1 addition & 1 deletion packages/node/src/local/updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export class FlagConfigUpdaterBase {
})
.catch((err) => {
this.logger.warn(
`[Experiment] Cohort download failed ${cohortId}, using existing cohort`,
`[Experiment] Cohort download failed ${cohortId}, using existing cohort if exist`,
err,
);
failedCohortIds.add(cohortId);
Expand Down
2 changes: 1 addition & 1 deletion packages/node/test/local/client.eu.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Experiment } from 'src/factory';

dotenv.config({ path: path.join(__dirname, '../../', '.env') });

if (!process.env['API_KEY'] && !process.env['SECRET_KEY']) {
if (!process.env['EU_API_KEY'] && !process.env['EU_SECRET_KEY']) {
throw new Error(
'No env vars found. If running on local, have you created .env file correct environment variables? Checkout README.md',
);
Expand Down

0 comments on commit 8ea58b9

Please sign in to comment.