Skip to content

Commit

Permalink
Added logger statements
Browse files Browse the repository at this point in the history
  • Loading branch information
mvpoyatt authored and mvpoyatt committed Oct 3, 2024
1 parent bff3aab commit 010c6ff
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/api/channels/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,19 +136,23 @@ async function fetchRegistry() {
try {
let res;

logger.info(process.env.REGISTRY_URL);

if (process.env.GITHUB_TOKEN) {
logger.info('Using GitHub token for polymer-registry');
res = await fetch(process.env.REGISTRY_URL!, {
headers: {
Authorization: `token ${process.env.GITHUB_TOKEN}`,
},
cache: 'no-store'
});
} else {
logger.info('No token');
res = await fetch(process.env.REGISTRY_URL!);
}

if (!res.ok) {
logger.error('Error fetching polymer-registry: ' + res.statusText);
logger.error('Error from polymer-registry call: ' + res.statusText);
return {};
}
data = await res.json();
Expand Down

0 comments on commit 010c6ff

Please sign in to comment.