Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

Make /admin/login return a descriptive error when no password is provided #342

Merged
merged 3 commits into from
Apr 19, 2024

Conversation

matt-fidd
Copy link
Contributor

Fixes #308

This change makes /account/login consistent with other non-authenticated endpoints and adds a more descriptive error message when no password is provided in the request body.

Before

% curl -X POST http://localhost:5006/account/login                                                                                                                                                                                                                   
{"status":"error","reason":"internal-error"}

After

% curl -X POST http://localhost:5006/account/login                                                                                                                                                                                                                   
{"status":"error","reason":"invalid-password"}

Copy link
Member

@MatissJanis MatissJanis left a comment

Choose a reason for hiding this comment

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

Thanks for working on this! Just two small change requests, but other than that this looks great!

@trafico-bot trafico-bot bot added ✅ Approved Pull Request has been approved and can be merged and removed 🔍 Ready for Review labels Apr 19, 2024
@MatissJanis MatissJanis merged commit 1bbba66 into actualbudget:master Apr 19, 2024
6 checks passed
@trafico-bot trafico-bot bot added ✨ Merged Pull Request has been merged successfully and removed ✅ Approved Pull Request has been approved and can be merged labels Apr 19, 2024
joewashear007 pushed a commit to joewashear007/actual-server that referenced this pull request Apr 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
✨ Merged Pull Request has been merged successfully
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Trying to login without a body causes internal server error
2 participants