Making WordPress.org

Opened 12 months ago

Closed 11 months ago

Last modified 10 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 12 months ago.

Download all attachments as: .zip

Change History (4)

12 months ago

#1 @SergeyBiryukov
11 months ago

  • Keywords commit added

#2 @obenland
11 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.

10 months ago

Note: See TracTickets for help on using tickets.