From 5efe136ab783a6772ede2108b6ebb96464dba94b Mon Sep 17 00:00:00 2001 From: Lukasz Ostrowski Date: Tue, 28 Feb 2023 14:12:31 +0100 Subject: [PATCH] Invoices: Bump sdk to 0.33 and update register handler errors (#222) --- apps/invoices/package.json | 2 +- apps/invoices/src/pages/api/register.ts | 9 +-------- pnpm-lock.yaml | 8 ++++---- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/apps/invoices/package.json b/apps/invoices/package.json index e4d9a4f..e16885e 100644 --- a/apps/invoices/package.json +++ b/apps/invoices/package.json @@ -20,7 +20,7 @@ "@material-ui/core": "^4.12.4", "@material-ui/icons": "^4.11.3", "@material-ui/lab": "4.0.0-alpha.61", - "@saleor/app-sdk": "0.32.7", + "@saleor/app-sdk": "0.33.0", "@saleor/macaw-ui": "^0.7.2", "@sentry/nextjs": "^7.36.0", "@tanstack/react-query": "^4.24.4", diff --git a/apps/invoices/src/pages/api/register.ts b/apps/invoices/src/pages/api/register.ts index b72e529..be70546 100644 --- a/apps/invoices/src/pages/api/register.ts +++ b/apps/invoices/src/pages/api/register.ts @@ -3,7 +3,7 @@ import { saleorApp } from "../../../saleor-app"; import { gql } from "urql"; import { createClient } from "../../lib/graphql"; import { SaleorVersionQuery } from "../../../generated/graphql"; -import invariant from "tiny-invariant"; + import { createLogger } from "../../lib/logger"; const semver = require("semver"); @@ -98,13 +98,6 @@ export default createAppRegisterHandler({ throw respondWithError({ message: message, - body: { - success: false, - error: { - code: "INVALID_SALEOR_VERSION", - message: message, - }, - }, status: 400, }); } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0a5ec18..6e397a4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -120,7 +120,7 @@ importers: '@material-ui/core': ^4.12.4 '@material-ui/icons': ^4.11.3 '@material-ui/lab': 4.0.0-alpha.61 - '@saleor/app-sdk': 0.32.7 + '@saleor/app-sdk': 0.33.0 '@saleor/apps-shared': workspace:* '@saleor/macaw-ui': ^0.7.2 '@sentry/nextjs': ^7.36.0 @@ -163,7 +163,7 @@ importers: '@material-ui/core': 4.12.4_5ndqzdd6t4rivxsukjv3i3ak2q '@material-ui/icons': 4.11.3_x54wk6dsnsxe7g7vvfmytp77te '@material-ui/lab': 4.0.0-alpha.61_x54wk6dsnsxe7g7vvfmytp77te - '@saleor/app-sdk': 0.32.7_3vryta7zmbcsw4rrqf4axjqggm + '@saleor/app-sdk': 0.33.0_3vryta7zmbcsw4rrqf4axjqggm '@saleor/apps-shared': link:../../packages/shared '@saleor/macaw-ui': 0.7.2_pmlnlm755hlzzzocw2qhf3a34e '@sentry/nextjs': 7.36.0_next@13.1.6+react@18.2.0 @@ -4056,8 +4056,8 @@ packages: - supports-color dev: false - /@saleor/app-sdk/0.32.7_3vryta7zmbcsw4rrqf4axjqggm: - resolution: {integrity: sha512-nt4ylAc+pq39LUFzPdlDvmLlvgWDo0K+qMAklvFjiPFGXfFRqTpWs9t9pqDMACiJLM5dvFAkGYJI2T6h/LUD8Q==} + /@saleor/app-sdk/0.33.0_3vryta7zmbcsw4rrqf4axjqggm: + resolution: {integrity: sha512-JEeUTBIa2aRuIBEeV1U/C76Oy4hfdMnXo16XB+PH/wQUPSBIsKkfpAB82JmAQiLzHHvTh5V9QZynPqt8EZbCFw==} peerDependencies: next: '>=12' react: '>=17'