Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(hosted-hpb): Correctly handle API response when the account expir… #10970

Merged

Conversation

nickvergessen
Copy link
Member

@nickvergessen nickvergessen commented Nov 22, 2023

…ed or was deleted

☑️ Resolves

🛠️ API Checklist

  • Fixed an issue when the HPB expired (401 can be returned together with an empty response)
  • Improved the notifications (and fixed missing translations)
Before After
grafik Bildschirmfoto vom 2023-11-22 12-24-54

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not possible
  • 📘 API documentation in docs/ has been updated or is not required
  • 🔖 Capability is added or not needed

@nickvergessen nickvergessen added 3. to review bug feature: settings ⚙️ Settings and config related issues feature: signaling 📶 Internal and external signaling backends labels Nov 22, 2023
@nickvergessen nickvergessen added this to the 💙 Next Beta (28) milestone Nov 22, 2023
@nickvergessen nickvergessen self-assigned this Nov 22, 2023
// Account was deleted, so remove the information locally
$accountInfo = ['status' => 'deleted'];
} elseif ($e->getCode() === Http::STATUS_UNAUTHORIZED) {
// Account is expired and deletion is pending unless it's reactivated.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems previously expired accounts always received a 200 with body. Now it's a 401. Deleted accounts receive a 404.

So both cases are now specifically catched and handled so the status notifications happen as planned.

…ed or was deleted

Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen nickvergessen force-pushed the bugfix/9656/correctly-notify-admins-on-hpb-expiration branch from 5bae204 to f40fc78 Compare November 22, 2023 11:30
Copy link
Contributor

@Antreesy Antreesy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All that is close to my level of understanding, seems OK

Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen
Copy link
Member Author

/backport to stable27

@nickvergessen
Copy link
Member Author

/backport to stable26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review bug feature: settings ⚙️ Settings and config related issues feature: signaling 📶 Internal and external signaling backends
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error "Getting the account information failed: account not found" when HPB trial expired
2 participants