Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop debug printing kilobytes of discovery docs #4428

Merged
merged 5 commits into from
Apr 18, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
- Fixes console error on large uploads to Storage Emulator (#4407).
- Fixes cross-platform incompatibility with Storage Emulator exports (#4411).
- Fixes issue where function deployment errored on projects without secrets (#4425).
- 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