We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b837306 commit 53d67d1Copy full SHA for 53d67d1
src/service.ts
@@ -39,11 +39,15 @@ class Service {
39
* - Handles special cases for 'pal-' and 'checkout-' endpoints.
40
* @param url - The original endpoint URL.
41
* @returns The formatted endpoint URL.
42
- * @throws Error if liveEndpointUrlPrefix is missing for LIVE environment.
+ * @throws Error if url is not provided or liveEndpointUrlPrefix is missing for LIVE environment.
43
*/
44
protected createBaseUrl(url: string): string {
45
const config: Config = this.client.config;
46
47
+ if(!url) {
48
+ throw new Error("Endpoint URL must be provided.");
49
+ }
50
+
51
if (config.environment !== "LIVE") {
52
return url.replace("-live", "-test");
53
}
0 commit comments