Skip to content

Commit c4efc38

Browse files
gnzjgoampcode-com
andcommitted
feat: add debug logging to createBranch
Amp-Thread-ID: https://ampcode.com/threads/T-019d1b0d-6dca-7013-a8f8-af75363aae7d Co-authored-by: Amp <amp@ampcode.com>
1 parent e9af96c commit c4efc38

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/api/branches.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,11 @@ export async function createBranch(
159159
url.searchParams.set("last_partition", "1");
160160
}
161161

162+
const debug = !!process.env.TINYBIRD_DEBUG;
163+
if (debug) {
164+
console.log(`[debug] POST ${url.toString()}`);
165+
}
166+
162167
const response = await tinybirdFetch(url.toString(), {
163168
method: "POST",
164169
headers: {

0 commit comments

Comments
 (0)