Making WordPress.org

Opened 22 months ago

Closed 20 months ago

Last modified 20 months ago

#2958 closed defect (fixed)

Wrong error response when uploading subtitles without having selected a language

Reported by: tfrommen Owned by: obenland
Milestone: Priority: normal
Component: WordPress.tv Keywords: has-patch commit


When you upload a subtitle file without having selected a language, the error code 8 gets returned. The according message, however, is about already having subtitles for that language - which is not only wrong, but also just not possible.

Instead, the error code 7, indicating an invalid language, would be the right one to send.

Patch follows.

Attachments (1)

2958.patch (838 bytes) - added by tfrommen 22 months ago.

Download all attachments as: .zip

Change History (4)

22 months ago

#1 @SergeyBiryukov
21 months ago

  • Keywords commit added

#2 @obenland
20 months ago

  • Owner set to obenland
  • Resolution set to fixed
  • Status changed from new to closed

In 5855:

WP.tv: Use more appropriate error message.

In the unlikely case that no subtitle language was provided, let's bail saying
it's an invalid language rather than suggesting there is already a subtitle for
that language.

Props tfrommen.
Fixes #2958.

This ticket was mentioned in Slack in #meta by tfrommen. View the logs.

20 months ago

Note: See TracTickets for help on using tickets.