diff --git a/server/services/CommonService.ts b/server/services/CommonService.ts index f90b1d6fe..56386dbe2 100644 --- a/server/services/CommonService.ts +++ b/server/services/CommonService.ts @@ -38,6 +38,20 @@ export default class IndexService { try { const { callAsCurrentUser: callWithRequest } = this.osDriver.asScoped(request); const finalData = data; + + /** + * The endpoint must not be an empty string, reference from proxy caller + */ + if (!endpoint) { + return response.custom({ + statusCode: 200, + body: { + ok: false, + error: `Expected non-empty string on endpoint`, + }, + }); + } + /** * Update path parameter to follow RFC/generic HTTP convention */