Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Product/Middleware API :: Missing error handling for incorrect product id #5693

Closed
sync-by-unito bot opened this issue Mar 22, 2021 · 3 comments
Closed
Assignees
Labels
backlog bug Bug reports Next Issues/bugs for Vue Storefront Next

Comments

@sync-by-unito
Copy link

sync-by-unito bot commented Mar 22, 2021

Expected result

Middleware responds with 404 Not Found response (or other adequate); response contains error message

Actual result

API does not respond with any response; GraphQL error is being thrown

Request

POST /api/ct/getProduct HTTP/1.1
Host: localhost:3000
Content-Length: 20
sec-ch-ua: "Chromium";v="89", ";Not A Brand";v="99"
Accept: application/json, text/plain, */*
sec-ch-ua-mobile: ?0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36
Content-Type: application/json;charset=UTF-8
Origin: http://localhost:3000
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: http://localhost:3000/p/38143c0c-c9b0-448c-93cd-60eb90d8da57/aspesi-shirt-h805-white
Accept-Encoding: gzip, deflate
Accept-Language: pl-PL,pl;q=0.9,en-US;q=0.8,en;q=0.7
Cookie: vsf-locale=en; vsf-commercetools-token=%7B%22access_token%22%3A%22<token>%22%2C%22token_type%22%3A%22Bearer%22%2C%22expires_in%22%3A172713%2C%22scope%22%3A%22manage_products%3Avsf-ct-dev%20create_anonymous_token%3Avsf-ct-dev%20manage_my_profile%3Avsf-ct-dev%20manage_customer_groups%3Avsf-ct-dev%20view_products%3Avsf-ct-dev%20view_customer_groups%3Avsf-ct-dev%20view_categories%3Avsf-ct-dev%20introspect_oauth_tokens%3Avsf-ct-dev%20manage_my_payments%3Avsf-ct-dev%20manage_my_orders%3Avsf-ct-dev%20manage_my_shopping_lists%3Avsf-ct-dev%20view_published_products%3Avsf-ct-dev%22%2C%22expires_at%22%3A1616605244386%7D
Connection: close

[
  {
    "id":"test"
  },
  null
]

Console output

ERROR [VSF][error] [GraphQL error]: Message: Malformed parameter: where: Invalid UUID string: test, Location: [column: 3, line: 73], Path: products

@sync-by-unito sync-by-unito bot added backlog bug Bug reports labels Mar 22, 2021
@filrak filrak added the Next Issues/bugs for Vue Storefront Next label Mar 25, 2021
@filrak
Copy link
Collaborator

filrak commented Mar 25, 2021

possible fix #5643

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Mar 26, 2021

➤ Jakub Andrzejewski commented:

Solved in #5712 ( https://github.com/vuestorefront/vue-storefront/pull/5712|smart-link )

@sync-by-unito sync-by-unito bot assigned filrak and Baroshem and unassigned Baroshem and filrak Mar 26, 2021
@sync-by-unito sync-by-unito bot closed this as completed Mar 29, 2021
@sync-by-unito
Copy link
Author

sync-by-unito bot commented Mar 29, 2021

➤ Jakub Andrzejewski commented:

Merged with PR above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog bug Bug reports Next Issues/bugs for Vue Storefront Next
Projects
None yet
Development

No branches or pull requests

2 participants