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

Updating login.rs with generic incorrect_login response. #3549

Merged
merged 1 commit into from
Jul 10, 2023

Conversation

rosenjcb
Copy link
Contributor

@rosenjcb rosenjcb commented Jul 8, 2023

As discussed LemmyNet/lemmy-ui#1874 and LemmyNet/lemmy-ui#1874, this is the backend PR for updating the login failure response.

@rosenjcb
Copy link
Contributor Author

rosenjcb commented Jul 8, 2023

Weird clippy failure from woodpecker:

LLVM ERROR: IO failure on output stream: No space left on device
error: could not compile `diesel_derives` (lib)
warning: build failed, waiting for other jobs to finish...
The following warnings were emitted during compilation:

@@ -23,7 +23,7 @@ impl Perform for Login {
let username_or_email = data.username_or_email.clone();
let local_user_view = LocalUserView::find_by_email_or_name(context.pool(), &username_or_email)
.await
.map_err(|e| LemmyError::from_error_message(e, "couldnt_find_that_username_or_email"))?;
.map_err(|e| LemmyError::from_error_message(e, "incorrect_login"))?;
Copy link
Member

Choose a reason for hiding this comment

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

FYI, error change is coming: #3487

@Nutomic Nutomic enabled auto-merge (squash) July 10, 2023 10:48
@Nutomic Nutomic merged commit e7e60e0 into LemmyNet:main Jul 10, 2023
PawanHegde pushed a commit to PawanHegde/lemmy that referenced this pull request Jul 10, 2023
Nutomic added a commit that referenced this pull request Jul 10, 2023
* Fix #3366: API does return plain HTML errors

* Fix Clippy errors

* Improve api response times by doing send_activity asynchronously (#3493)

* do send_activity after http response

* move to util function

* format

* fix prometheus

* make synchronous federation configurable

* cargo fmt

* empty

* empty

---------

Co-authored-by: Dessalines <[email protected]>

* Updating `login.rs` with generic `incorrect_login` response. (#3549)

* Adding v0.18.1 and v0.18.0 release notes. (#3530)

* Update RELEASES.md (#3556)

added instruction to find the location of your docker directory (especially useful for those who used ansible since they never had to setup docker manually)

* Use async email sender (#3554)

* Upgrade all dependencies (#3526)

* Upgrade all dependencies

* as base64

* Adding phiresky to codeowners. (#3576)

* Error enum fixed (#3487)

* Create error type enum

* Replace magic string slices with LemmyErrorTypes

* Remove unused enum

* Add rename snake case to error enum

* Rename functions

* clippy

* Fix merge errors

* Serialize in PascalCase instead of snake_case

* Revert src/lib

* Add serialization tests

* Update translations

* Fix compilation error in test

* Fix another compilation error

* Add code for generating typescript types

* Various fixes to avoid breaking api

* impl From<LemmyErrorType> for LemmyError

* with_lemmy_type

* trigger ci

---------

Co-authored-by: SleeplessOne1917 <[email protected]>

* Only update site_aggregates for local site (#3516)

* Fix #3501 - Fix aggregation counts for elements removed and deleted (#3543)

Two bugs were found and fixed:
- previously elements removal and deletion were counted as two separate disappearances
- removing comments did not affect post aggregations

* Use LemmyErrorType also make error_type compulsory

* Add missing import for jsonify_plain_text_errors

* Fix formatting

* Trying to make woodpecker run again

---------

Co-authored-by: phiresky <[email protected]>
Co-authored-by: Dessalines <[email protected]>
Co-authored-by: rosenjcb <[email protected]>
Co-authored-by: nixoye <[email protected]>
Co-authored-by: dullbananas <[email protected]>
Co-authored-by: Nutomic <[email protected]>
Co-authored-by: SleeplessOne1917 <[email protected]>
Co-authored-by: Sander Saarend <[email protected]>
Co-authored-by: Piotr Juszczyk <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants