Page MenuHomePhabricator

Fix HTTP 400 from notification server for JSON subscription objects
ClosedPublic

Authored by epriestley on Jul 17 2014, 2:19 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 24, 11:36 PM
Unknown Object (File)
Sat, Apr 20, 7:21 PM
Unknown Object (File)
Sun, Apr 14, 1:58 PM
Unknown Object (File)
Thu, Apr 4, 2:10 AM
Unknown Object (File)
Mar 31 2024, 10:19 AM
Unknown Object (File)
Mar 29 2024, 5:58 PM
Unknown Object (File)
Mar 24 2024, 3:14 AM
Unknown Object (File)
Mar 7 2024, 3:03 AM
Subscribers

Details

Summary

Fixes T5651. Sometime we'll send an object to the notification server for subscribers, which it will choke on. Use array_values() to make sure we're sending an array.

Test Plan

With (object) instead, got a consistent error ("no .filter method on object"). With array_values(), no error.

Diff Detail

Repository
rP Phabricator
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

epriestley retitled this revision from to Possible fix for HTTP 400 from notification server.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: joshuaspence.
  • Also log 400's.
  • Tested and confirmed it's actually the issue and works. Specifically, I used (object) to reliably reproduce the error:

    [Thu Jul 17 2014 14:02:23 GMT-0700 (PDT)] <127.0.0.1> Bad Request! TypeError: Object [object Object] has no method 'filter'
joshuaspence edited edge metadata.

Yeah okay... this makes sense.

This revision is now accepted and ready to land.Jul 17 2014, 9:41 PM

(maybe clean up the diff title and summary before landing this)

epriestley retitled this revision from Possible fix for HTTP 400 from notification server to Fix HTTP 400 from notification server for JSON subscription objects.Jul 17 2014, 9:46 PM
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley edited edge metadata.
epriestley updated this revision to Diff 23917.

Closed by commit rP6bf4ec97d563 (authored by @epriestley).