Skip to content

Commit

Permalink
Stop debug printing kilobytes of discovery docs (#4428)
Browse files Browse the repository at this point in the history
* Stop debug printing kilobytes of discovery docs

* Changelog

* Formatter

Co-authored-by: Daniel Lee <danielylee@google.com>
  • Loading branch information
inlined and taeold committed Apr 18, 2022
1 parent 6c9273c commit ce040bc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
- Fixes cross-platform incompatibility with Storage Emulator exports (#4411).
- Fixes issue where function deployment errored on projects without secrets (#4425).
- Adds a blocking trigger type (#4395).
- Removes verbose HTTP responses from debug logs (#4428)
8 changes: 6 additions & 2 deletions src/ensureApiEnabled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ export async function check(
prefix: string,
silent = false
): Promise<boolean> {
const res = await apiClient.get<{ state: string }>(`/projects/${projectId}/services/${apiName}`);
const res = await apiClient.get<{ state: string }>(`/projects/${projectId}/services/${apiName}`, {
skipLog: { resBody: true },
});
const isEnabled = res.body.state === "ENABLED";
if (isEnabled && !silent) {
utils.logLabeledSuccess(prefix, `required API ${bold(apiName)} is enabled`);
Expand All @@ -48,7 +50,9 @@ export async function check(
*/
async function enable(projectId: string, apiName: string): Promise<void> {
try {
await apiClient.post(`/projects/${projectId}/services/${apiName}:enable`);
await apiClient.post(`/projects/${projectId}/services/${apiName}:enable`, {
skipLog: { resBody: true },
});
} catch (err: any) {
if (isBillingError(err)) {
throw new FirebaseError(`Your project ${bold(
Expand Down

0 comments on commit ce040bc

Please sign in to comment.