@geniehr/utilities 1.0.17 → 1.0.18

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.
@@ -161,13 +161,16 @@ export class ConductorClient {
161
161
  return response.data.status;
162
162
  }
163
163
  catch (error) {
164
- // Fallback to full workflow fetch with minimal data if status endpoint doesn't exist
165
- if (error.response?.status === 404 || error.response?.status === 405) {
164
+ // Fallback to full workflow fetch if status endpoint doesn't exist or fails
165
+ // This handles 404, 405, or any other error from the status endpoint
166
+ try {
166
167
  const workflow = await this.getWorkflow(workflowInstanceId, false);
167
168
  return workflow.status;
168
169
  }
169
- console.error(`Error getting workflow status:`, error.message);
170
- throw error;
170
+ catch (fallbackError) {
171
+ console.error(`Error getting workflow status:`, fallbackError.message);
172
+ throw fallbackError;
173
+ }
171
174
  }
172
175
  }
173
176
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geniehr/utilities",
3
- "version": "1.0.17",
3
+ "version": "1.0.18",
4
4
  "description": "",
5
5
  "homepage": "https://github.com/Genie-HR/ghr-utilities#readme",
6
6
  "bugs": {