@slingr/slingr-services 0.0.6 → 0.0.7

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.
package/index.js CHANGED
@@ -130,7 +130,7 @@ const loadPlatformWebServices = () => {
130
130
  if (settings.token === req?.headers?.token) {
131
131
  validToken = true
132
132
  }
133
- if (!validToken && localDeployment) {
133
+ if (!validToken && settings.localDeployment) {
134
134
  // if the service is running in local environment, pass token validation
135
135
  if (!firstLocalDeploymentWarning) {
136
136
  firstLocalDeploymentWarning = true;
@@ -282,7 +282,14 @@ const loadPlatformWebServices = () => {
282
282
  });
283
283
 
284
284
  } else {
285
- next(new Error('Cannot find function [' + functionName + '] on service [' + svcName + ']'));
285
+ // The platform was retrying this request multiple times since it didn't get a response in this case
286
+ // so lets send it a 500
287
+ appLogger.error(`Cannot find function [${functionName}] on service [${settings.svcName}]`);
288
+ res.status(500).send({
289
+ date: + new Date(),
290
+ data: convertException(`Cannot find function [${functionName}] on service [${settings.svcName}]`)
291
+ });
292
+ next(new Error('Cannot find function [' + functionName + '] on service [' + settings.svcName + ']'));
286
293
  }
287
294
 
288
295
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slingr/slingr-services",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "Nodejs SDK to create Slingr Services",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -6,7 +6,7 @@ const stream = require('node:stream');
6
6
  const pStream = stream.promises;
7
7
  const FormData = require('form-data');
8
8
 
9
- const FILES_API_PATH = '/svcss/files'
9
+ const FILES_API_PATH = '/services/files'
10
10
  const TMP_FILES_PATH = './tmp/'
11
11
 
12
12
  const clearTmpFile = async (filePath) => {