Browse Source

try hard coding Chromium User-Agent and log fetch error

develop
Rob Colbert 5 months ago
parent
commit
04b318b003
  1. 6
      app/services/venue.js

6
app/services/venue.js

@ -195,7 +195,7 @@ class VenueService extends SiteService {
const response = await fetch(requestUrl, {
agent: this.httpsAgent,
headers: {
'user-agent': this.userAgent.toString(),
'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36',
'Accept-Language': 'en-US',
},
});
@ -218,7 +218,7 @@ class VenueService extends SiteService {
const response = await fetch(requestUrl, {
agent: this.httpsAgent,
headers: {
'user-agent': this.userAgent.toString(),
'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36',
'Accept-Language': 'en-US',
},
});
@ -230,9 +230,9 @@ class VenueService extends SiteService {
if (!json.success) {
throw new Error(`failed to fetch channel status: ${json.message}`);
}
return json.channel;
} catch (error) {
this.log.error('failed to update channel status', { error });
loganService.sendEvent(module.exports, {
level: 'error',
event: 'updateChannelStatus',

Loading…
Cancel
Save