Skip to content

Conversation

@dessalines
Copy link
Member

No description provided.

Comment on lines -92 to -95
RegistrationDenied {
#[cfg_attr(feature = "ts-rs", ts(optional))]
reason: Option<String>,
},
Copy link
Member Author

Choose a reason for hiding this comment

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

This was incorrect, and I fixed it.

/// A remote community sent an activity to us, but actually no local user follows the community
/// so the activity was rejected.
CommunityHasNoFollowers(String),
ResolveObjectFailed(String),
Copy link
Member Author

@dessalines dessalines Jan 6, 2026

Choose a reason for hiding this comment

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

Moved this to a standard LemmyError. Really UntranslatedError should only be for federation / internal errors. Anything that the API can potentially return should be a LemmyError

new LemmyError(
"resolve_object_failed",
statusBadRequest,
'Domain "lemmy-alpha" is not in allowlist',
Copy link
Member Author

Choose a reason for hiding this comment

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

Here's an example of the internal error message being returned and checked.

We don't actually have to show this in lemmy-ui, but it might be good to console log it there anyway.

@Nutomic Nutomic merged commit 99b9e81 into error-details Jan 7, 2026
2 checks passed
@Nutomic Nutomic deleted the error-details-dess branch January 7, 2026 09:25
Nutomic added a commit that referenced this pull request Jan 7, 2026
)

* Return error details in HTTP response

* separate error

* make format of UntranslatedError match LemmyErrorType

* Fixing jest failure tests, adding test for registration denied. (#6267)

* Fixing jest failure tests, adding test for registration denied.

* Fixing tests.

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
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