cob-cli 2.55.0-beta-3 → 2.55.0-beta-4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -87,13 +87,18 @@ const defnameCache = {
|
|
|
87
87
|
get: async function(id) {
|
|
88
88
|
if(!this.resolved.has(id)){
|
|
89
89
|
const uri = `https://${this.servername}.cultofbits.com/recordm/recordm/definitions/${id}`
|
|
90
|
-
|
|
90
|
+
try {
|
|
91
|
+
const response = await axios.get( uri );
|
|
91
92
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
if(response.status != 200){
|
|
94
|
+
throw new Error(`HTTP Error Response: ${response.status} ${response.statusText}`);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
this.resolved.set(id, response.data.name)
|
|
98
|
+
} catch(err) {
|
|
99
|
+
throw new Error(`Couldn't get the Definition with id ${id}: ${err}`)
|
|
95
100
|
|
|
96
|
-
|
|
101
|
+
}
|
|
97
102
|
}
|
|
98
103
|
|
|
99
104
|
return this.resolved.get(id)
|
package/package.json
CHANGED