Page MenuHomePhorge

Avoid "No such token" exception going to /token/give/ directly
AbandonedPublic

Authored by aklapper on Mar 4 2025, 17:31.
Tags
None
Referenced Files
F3388359: D25903.1744446493.diff
Fri, Apr 11, 08:28
F3388358: D25903.1744446491.diff
Fri, Apr 11, 08:28
F3368550: D25903.1744209688.diff
Tue, Apr 8, 14:41
F3364737: D25903.1744159938.diff
Tue, Apr 8, 00:52
F3355907: D25903.1743878189.diff
Fri, Apr 4, 18:36
F3328283: D25903.1743453096.diff
Sun, Mar 30, 20:31
F3307251: D25903.1743142021.diff
Thu, Mar 27, 06:07
F3284543: D25903.1742778493.diff
Sun, Mar 23, 01:08

Details

Summary

Handle bots doing strange things more gracefully by not throwing a noisy uninteresting exception in my error log.

EXCEPTION: (Exception) No such token ""! at [<phorge>/src/applications/tokens/editor/PhabricatorTokenGivenEditor.php:153]

Closes T16006

Test Plan
  • Go to /token/give/PHID-TASK-someValidId/ and click one of the tokens, compare Phorge behavior before and after patch
  • Go to a task, in the sidebar, click "Award a Token" and "Rescind a Token": Still works as before

Diff Detail

Repository
rP Phorge
Branch
T16006TokenExcpt (branched from master)
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 1764
Build 1764: arc lint + arc unit

Event Timeline

aklapper requested review of this revision.Mar 4 2025, 17:31

Per comments in T16006 this is rather workaround (ignore) instead of a fix (make it work).

I believe that this is not the correct approach, thus abandoning.