WordPress.org

Making WordPress.org

Opened 2 years ago

Closed 2 years ago

Last modified 2 years 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
Cc:

Description

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 2 years ago.

Download all attachments as: .zip

Change History (4)

@tfrommen
2 years ago

#1 @SergeyBiryukov
2 years ago

  • Keywords commit added

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


2 years ago

Note: See TracTickets for help on using tickets.