diff --git a/.changeset/gorgeous-deers-lay.md b/.changeset/gorgeous-deers-lay.md new file mode 100644 index 0000000..2eedd1a --- /dev/null +++ b/.changeset/gorgeous-deers-lay.md @@ -0,0 +1,5 @@ +--- +"@saleor/app-sdk": patch +--- + +Improved and fixed debug logs in createAppRegistedHandler diff --git a/src/handlers/next/create-app-register-handler.ts b/src/handlers/next/create-app-register-handler.ts index 759c449..3dbc76d 100644 --- a/src/handlers/next/create-app-register-handler.ts +++ b/src/handlers/next/create-app-register-handler.ts @@ -155,12 +155,15 @@ export const createAppRegisterHandler = ({ } if (!validateAllowSaleorUrls(saleorApiUrl, allowedSaleorUrls)) { - debug("Validation of URL %s against allowSaleorUrls param resolves to false, throwing"); + debug( + "Validation of URL %s against allowSaleorUrls param resolves to false, throwing", + saleorApiUrl + ); return Response.Forbidden( createRegisterHandlerResponseBody(false, { code: "SALEOR_URL_PROHIBITED", - message: "This app expects to be installed only in allowed saleor instances", + message: "This app expects to be installed only in allowed Saleor instances", }) ); } @@ -188,7 +191,7 @@ export const createAppRegisterHandler = ({ createRegisterHandlerResponseBody(false, { code: "UNKNOWN_APP_ID", message: - "The auth data given during registration request could not be used to fetch app ID.", + "The auth data given during registration request could not be used to fetch app ID. This usually means that App could not connect to Saleor during installation", }), { status: 401,