Skip to content

Commit 209f0a4

Browse files
authored
Merge pull request #3963 from segmentio/develop
Release 22.50.2
2 parents 849c1f2 + eefd638 commit 209f0a4

File tree

16 files changed

+3779
-5666
lines changed

16 files changed

+3779
-5666
lines changed

scripts/private-destination.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ const PRIVATE_DESTINATIONS = yaml.load(fs.readFileSync(path.resolve(__dirname, `
2020
const privateDests = PRIVATE_DESTINATIONS.items
2121
let private = []
2222
const getCatalog = async (url, page_token = "MA==") => {
23+
let res = null
2324
try {
24-
const res = await axios.get(url, {
25+
res = await axios.get(url, {
2526
headers: {
2627
'Content-Type': 'application/json',
2728
'Authorization': `Bearer ${process.env.PAPI_TOKEN}`
@@ -33,10 +34,14 @@ const getCatalog = async (url, page_token = "MA==") => {
3334
}
3435
}
3536
});
36-
3737
return res.data
38-
} catch (error) {
39-
console.log(error)
38+
} catch (err) {
39+
console.error("Error response:");
40+
console.error(err.response.data); // ***
41+
console.error(err.response.status); // ***
42+
console.error(err.response.headers); // ***
43+
} finally {
44+
4045
}
4146
}
4247

@@ -48,6 +53,9 @@ const checkDestinationStatus = async (id) => {
4853
}
4954
const getDestinationData = async (id) => {
5055
const res = await getCatalog(`${PAPI_URL}/catalog/destinations/${id}`)
56+
if (res == null) {
57+
return
58+
}
5159
let destination = res.data.destinationMetadata
5260
let settings = destination.options
5361
settings.sort((a, b) => {

src/_data/catalog/destination_categories.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# AUTOGENERATED FROM PUBLIC API. DO NOT EDIT
2-
# destination categories last updated 2022-12-13
2+
# destination categories last updated 2022-12-15
33
items:
44
- display_name: A/B Testing
55
slug: a-b-testing

0 commit comments

Comments
 (0)