Closed Bug 712314 Opened 13 years ago Closed 13 years ago

Add-on does not deal correctly with 401 (Auth failed) errors

Categories

(Pancake Graveyard :: Add-On, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: st3fan, Unassigned)

Details

When the Add-on receives a 401 (Auth Failed) error on one of the /addon/* API methods, it does not take the right actions. To reproduce: 1) Create a new account on the Pancake web site 2) Run the add-on in a new empty profile 3) Click the pancake button and sign in 4) Generate some data, validate that the addon is sending data to Pancake 5) Quit the browser 6) Using *another* profile or browser, delete the Pancake account 7) Start browser in which the addon was installed again with the same profile that was previously used 8) Browser to some site to make the addon push data Since the account does not exist anymore, the server will return a 401. This looks like this: debug: Uploading 8 changesets to server with a total of 16 changes with encoded size: 2232 debug: Pancake._periodicSynchronizeTask: status=[401] [Unauthorized] debug: Server did not accept results. Pushing changesets back to storage. debug: Server is busy or malfunctioning: status: 401 json: null The problem is that the addon is still running after this error. It does not mean that the server is busy or failing. The 401 is a special case that should be handled as follows: 1) Stop the add-on 2) Delete the add-on credentials from the password store 3) Show a dialog with a link to the add-on login page
to verify: follow the above steps - you should be requested to re-login
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.