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

Fixed unclear error message during api/products/image requests with improper input data #22309

Merged
merged 3 commits into from
Mar 31, 2021

Conversation

KminekMatej
Copy link
Contributor

@KminekMatej KminekMatej commented Dec 9, 2020

Add new throw clause for better debug, when input data are not specified correctly

Questions Answers
Branch? develop
Description? Improper input data during api/products/image requests leads to unclear error message. I added a bit more detailed error message.
Type? improvement
Category WS
BC breaks? no
Deprecations? no
Fixed ticket? Fixes #22313 .
How to test? Send request with malformed image property - instead of displaying error code 500 / 66: Unable to save this image, response should be 400 / 67: Missing tmp_file property. Check supplied input data.

This change is Reviewable

Add new throw clause for better debug, when input data are not specified correctly
@KminekMatej KminekMatej requested a review from a team as a code owner December 9, 2020 14:47
@prestonBot
Copy link
Collaborator

Hello @KminekMatej!

This is your first pull request on the PrestaShop project. Thank you, and welcome to this Open Source community!

@prestonBot
Copy link
Collaborator

Hi, thanks for this contribution!

I found some issues with the Pull Request description:

  • The category should be one of these: BO, CO, FO, IN, LO, ME, PM, TE or WS (Read explanation)
  • Your pull request does not seem to fix any issue, consider creating one (see note below) and linking it by writing Fixes #1234.

Would you mind having a look at it? This will help us understand how interesting your contribution is, thank you very much!

About linked issues

Please consider opening an issue before submitting a Pull Request:

  • If it's a bug fix, it helps maintainers verify that the bug is effectively due to a defect in the code, and that it hasn't been fixed already.
  • It can help trigger a discussion about the best implementation path before a single line of code is written.
  • It may lead the Core Product team to mark that issue as a priority, further attracting the maintainers' attention.

(Note: this is an automated message, but answering it will reach a real human)

@prestonBot prestonBot added the Improvement Type: Improvement label Dec 9, 2020
@KminekMatej
Copy link
Contributor Author

Fixes #22313

Update array specification to match PSR coding standards
@prestonBot prestonBot added the develop Branch label Dec 10, 2020
Update error response by using the one which is already in PUT request
@Progi1984 Progi1984 added the Waiting for QA Status: action required, waiting for test feedback label Dec 14, 2020
@Progi1984
Copy link
Contributor

@PrestaShop/qa-functional OK for a QA dev ?

@Robin-Fischer-PS
Copy link
Contributor

@Progi1984 Yes, OK for QA by dev. Thanks :)

@Robin-Fischer-PS Robin-Fischer-PS added the Waiting for dev Status: action required, waiting for tech feedback label Dec 14, 2020
@atomiix
Copy link
Contributor

atomiix commented Mar 31, 2021

Before the PR:
Capture d’écran 2021-03-31 à 16 06 52

After the PR:
Capture d’écran 2021-03-31 à 16 07 20

This PR is QA ✔️

@atomiix atomiix added QA ✔️ Status: check done, code approved and removed Waiting for QA Status: action required, waiting for test feedback Waiting for dev Status: action required, waiting for tech feedback labels Mar 31, 2021
@prestonBot
Copy link
Collaborator

QA approved, well done! Message to the maintainers: do not forget to milestone it before the merge.

@Progi1984 Progi1984 changed the title Update WebserviceSpecificManagementImages.php Fixed unclear error message during api/products/image requests with improper input data Mar 31, 2021
@Progi1984 Progi1984 merged commit f5734ea into PrestaShop:develop Mar 31, 2021
@Progi1984
Copy link
Contributor

Thanks @KminekMatej & @atomiix

@Progi1984 Progi1984 added this to the 1.7.8.0 milestone Mar 31, 2021
@prestonBot
Copy link
Collaborator

Contribution merged, congratulations!

Would you mind answering our quick 1-minute survey? We would love to hear about your experience so far, it will help us improve our process for the community involved, like you. ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
develop Branch Improvement Type: Improvement QA ✔️ Status: check done, code approved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Better error message on invalid image upload request
7 participants