Closed Bug 1377840 Opened 4 years ago Closed 4 years ago
Change return code for TM requests exceeding 255 bytes
STR: 1) Go to https://mozilla-pontoon-staging.herokuapp.com/cs/amo/all-resources/?status=missing&string=166657 2) Open network tab. 3) Refresh. You will see 400 bad request to /translation-memory/ for translation memory. This string is pretty rich on tags and quite long, so that may be the cause.
The filter doesn't show any strings. If the string is longer than 255 characters, TM returns 400 due to Postgres levenshtein limitations.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
Sorry, I was playing to reproduce the other bug with bulk actions. Now you will see the string. That will be probably the case. Anyway 400 return code is for client error, see https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1, but this is know state and an issue on the server side.
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
OK, maybe we could use 501 instead and detect too long requests on the client side already. But I'd prefer if we instead focused on finding a solution to support all TM requests, regardless of their length.
Priority: -- → P5
Summary: Bad requests for translation memory → Change return code for TM requests exceeding 255 bytes
Hello I would be interested in potentially tackling this bug, is it still available? Would mentoring also be available for this issue?
Nathaniel, this bug is already taken and Hadi needs to assign it to himself: https://github.com/mozilla/pontoon/pull/729/ Please ping me in #pontoon or privately via email if you're looking for a bug to take.
Commit pushed to master at https://github.com/mozilla/pontoon https://github.com/mozilla/pontoon/commit/b5ed449f9cc435782214bbc85f4e885588a1cd90 Fix bug 1377840: Update long TM request error code (#729) Update return code of TM requests exceeding 255 bytes
Status: REOPENED → RESOLVED
Closed: 4 years ago → 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.