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
- const response = await axios.get( uri );
90
+ try {
91
+ const response = await axios.get( uri );
91
92
 
92
- if(response.status != 200){
93
- throw new Error(`HTTP Error Response: ${response.status} ${response.statusText}`);
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
- this.resolved.set(id, response.data.name)
101
+ }
97
102
  }
98
103
 
99
104
  return this.resolved.get(id)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cob-cli",
3
- "version": "2.55.0-beta-3",
3
+ "version": "2.55.0-beta-4",
4
4
  "description": "A command line utility to help Cult of Bits partners develop with higher speed and reusing common code and best practices.",
5
5
  "preferGlobal": true,
6
6
  "repository": {