errors

package
v1.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package errors defines common error types and constants used across the Lesser ActivityPub service layer. It provides centralized error definitions for activity processing, validation, federation operations, and various service-specific error conditions.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrGetEntityType is returned when entity type extraction fails
	ErrGetEntityType = errors.New("failed to get entity type")

	// ErrUnmarshalActivityRecord is returned when activity record unmarshaling fails
	ErrUnmarshalActivityRecord = errors.New("failed to unmarshal activity record")

	// ErrParseActivity is returned when activity parsing fails
	ErrParseActivity = errors.New("failed to parse activity")

	// ErrUnknownActivityDirection is returned when activity direction is not recognized
	ErrUnknownActivityDirection = errors.New("unknown activity direction")

	// Follow activity errors
	// ErrFollowMissingObjectID is returned when follow activity object is missing id field
	ErrFollowMissingObjectID = errors.New("follow activity object missing id field")

	// ErrFollowInvalidObjectType is returned when follow activity has invalid object type
	ErrFollowInvalidObjectType = errors.New("follow activity has invalid object type")

	// ErrFollowMissingTargetUser is returned when follow activity is missing target user
	ErrFollowMissingTargetUser = errors.New("follow activity missing target user")

	// ErrExtractUsernamesFromFollow is returned when username extraction from Follow activity fails
	ErrExtractUsernamesFromFollow = errors.New("failed to extract usernames from Follow activity")

	// ErrCreateFollowRelationship is returned when creating follow relationship fails
	ErrCreateFollowRelationship = errors.New("failed to create follow relationship")

	// Accept activity errors
	// ErrAcceptInvalidObjectType is returned when accept activity has invalid object type
	ErrAcceptInvalidObjectType = errors.New("accept activity has invalid object type")

	// ErrExtractUsernamesFromAccept is returned when username extraction from Accept activity fails
	ErrExtractUsernamesFromAccept = errors.New("failed to extract usernames from Accept activity")

	// ErrUpdateRelationshipStatus is returned when updating relationship status fails
	ErrUpdateRelationshipStatus = errors.New("failed to update relationship status")

	// Create activity errors
	// ErrExtractNote is returned when note extraction from create activity fails
	ErrExtractNote = errors.New("failed to extract Note")

	// ErrCreateStatus is returned when status creation fails
	ErrCreateStatus = errors.New("failed to create status")

	// ErrStoreObject is returned when object storage fails
	ErrStoreObject = errors.New("failed to store object")

	// ErrUnsupportedObjectType is returned when object type is not supported
	ErrUnsupportedObjectType = errors.New("unsupported object type")

	// ErrCreateTimelineEntries is returned when timeline entry creation fails
	ErrCreateTimelineEntries = errors.New("failed to create timeline entries")

	// Reject activity errors
	// ErrRejectInvalidObjectType is returned when reject activity has invalid object type
	ErrRejectInvalidObjectType = errors.New("reject activity has invalid object type")

	// ErrExtractUsernamesFromReject is returned when username extraction from Reject activity fails
	ErrExtractUsernamesFromReject = errors.New("failed to extract usernames from Reject activity")

	// ErrDeleteRejectedRelationship is returned when deleting rejected relationship fails
	ErrDeleteRejectedRelationship = errors.New("failed to delete rejected relationship")

	// Delete activity errors
	// ErrDeleteMissingObjectID is returned when delete activity object is missing id field
	ErrDeleteMissingObjectID = errors.New("delete activity object missing id field")

	// ErrDeleteInvalidObjectType is returned when delete activity has invalid object type
	ErrDeleteInvalidObjectType = errors.New("delete activity has invalid object type")

	// ErrDeleteMissingObjectID2 is returned when delete activity is missing object ID
	ErrDeleteMissingObjectID2 = errors.New("delete activity missing object ID")

	// ErrActorNotAuthorizedDelete is returned when actor is not authorized to delete object
	ErrActorNotAuthorizedDelete = errors.New("actor not authorized to delete object")

	// ErrCreateTombstone is returned when tombstone creation fails
	ErrCreateTombstone = errors.New("failed to create tombstone")

	// Like activity errors
	// ErrLikeMissingObjectID is returned when like activity object is missing id field
	ErrLikeMissingObjectID = errors.New("like activity object missing id field")

	// ErrLikeInvalidObjectType is returned when like activity has invalid object type
	ErrLikeInvalidObjectType = errors.New("like activity has invalid object type")

	// ErrLikeMissingObjectID2 is returned when like activity is missing object ID
	ErrLikeMissingObjectID2 = errors.New("like activity missing object ID")

	// ErrLikeMissingActor is returned when like activity is missing actor
	ErrLikeMissingActor = errors.New("like activity missing actor")

	// ErrCreateLikeRecord is returned when creating like record fails
	ErrCreateLikeRecord = errors.New("failed to create like record")

	// Announce activity errors
	// ErrAnnounceMissingObjectID is returned when announce activity object is missing id field
	ErrAnnounceMissingObjectID = errors.New("announce activity object missing id field")

	// ErrAnnounceInvalidObjectType is returned when announce activity has invalid object type
	ErrAnnounceInvalidObjectType = errors.New("announce activity has invalid object type")

	// ErrAnnounceMissingObjectID2 is returned when announce activity is missing object ID
	ErrAnnounceMissingObjectID2 = errors.New("announce activity missing object ID")

	// ErrAnnounceMissingActor is returned when announce activity is missing actor
	ErrAnnounceMissingActor = errors.New("announce activity missing actor")

	// ErrCreateAnnounceRecord is returned when creating announce record fails
	ErrCreateAnnounceRecord = errors.New("failed to create announce record")

	// Undo activity errors
	// ErrFetchOriginalActivity is returned when fetching original activity fails
	ErrFetchOriginalActivity = errors.New("failed to fetch original activity")

	// ErrUndoInvalidObjectType is returned when undo activity has invalid object type
	ErrUndoInvalidObjectType = errors.New("undo activity has invalid object type")

	// ErrExtractActivityTypeFromUndo is returned when extracting activity type from undo target fails
	ErrExtractActivityTypeFromUndo = errors.New("failed to extract activity type from undo target")

	// ErrActorNotAuthorizedUndo is returned when actor is not authorized to undo activity
	ErrActorNotAuthorizedUndo = errors.New("actor not authorized to undo activity")

	// ErrActivityNotFoundLocally is returned when activity is not found locally
	ErrActivityNotFoundLocally = errors.New("activity not found locally")

	// ErrExtractTargetActorFromFollow is returned when extracting target actor from follow activity fails
	ErrExtractTargetActorFromFollow = errors.New("unable to extract target actor from follow activity")

	// ErrDeleteFollowRelationship is returned when deleting follow relationship fails
	ErrDeleteFollowRelationship = errors.New("failed to delete follow relationship")

	// ErrExtractObjectIDFromCreate is returned when extracting object ID from create activity fails
	ErrExtractObjectIDFromCreate = errors.New("unable to extract object ID from create activity")

	// ErrUndoCreateMissingActor is returned when undo create activity is missing actor
	ErrUndoCreateMissingActor = errors.New("undo create activity missing actor")

	// ErrDeleteCreatedObject is returned when deleting created object fails
	ErrDeleteCreatedObject = errors.New("failed to delete created object")

	// ErrExtractObjectIDFromUpdate is returned when extracting object ID from update activity fails
	ErrExtractObjectIDFromUpdate = errors.New("unable to extract object ID from update activity")

	// ErrUndoUpdateMissingActor is returned when undo update activity is missing actor
	ErrUndoUpdateMissingActor = errors.New("undo update activity missing actor")

	// ErrGetObjectHistory is returned when getting object history fails
	ErrGetObjectHistory = errors.New("failed to get object history")

	// ErrNoHistoryFound is returned when no history is found for object
	ErrNoHistoryFound = errors.New("no history found for object")

	// ErrPreviousStateNotAvailable is returned when previous state is not available for object
	ErrPreviousStateNotAvailable = errors.New("previous state not available for object")

	// ErrRevertObject is returned when reverting object fails
	ErrRevertObject = errors.New("failed to revert object")

	// ErrExtractObjectIDFromDelete is returned when extracting object ID from delete activity fails
	ErrExtractObjectIDFromDelete = errors.New("unable to extract object ID from delete activity")

	// ErrUndoDeleteMissingActor is returned when undo delete activity is missing actor
	ErrUndoDeleteMissingActor = errors.New("undo delete activity missing actor")

	// ErrCheckTombstoneStatus is returned when checking tombstone status fails
	ErrCheckTombstoneStatus = errors.New("failed to check tombstone status")

	// ErrObjectNotDeleted is returned when object is not deleted
	ErrObjectNotDeleted = errors.New("object is not deleted")

	// ErrGetTombstone is returned when getting tombstone fails
	ErrGetTombstone = errors.New("failed to get tombstone")

	// ErrGetObjectHistoryForRestoration is returned when getting object history for restoration fails
	ErrGetObjectHistoryForRestoration = errors.New("failed to get object history for restoration")

	// ErrNoPreviousStateForRestoration is returned when no previous state is available for restoration
	ErrNoPreviousStateForRestoration = errors.New("no previous state available for restoration")

	// ErrRestoreObject is returned when restoring object fails
	ErrRestoreObject = errors.New("failed to restore object")

	// ErrExtractOriginalActivityIDFromAccept is returned when extracting original activity ID from accept activity fails
	ErrExtractOriginalActivityIDFromAccept = errors.New("unable to extract original activity ID from accept activity")

	// ErrUndoAcceptMissingActor is returned when undo accept activity is missing actor
	ErrUndoAcceptMissingActor = errors.New("undo accept activity missing actor")

	// ErrExtractFlaggedObjectIDFromFlag is returned when extracting flagged object ID from flag activity fails
	ErrExtractFlaggedObjectIDFromFlag = errors.New("unable to extract flagged object ID from flag activity")

	// ErrUndoFlagMissingActor is returned when undo flag activity is missing actor
	ErrUndoFlagMissingActor = errors.New("undo flag activity missing actor")

	// ErrRetrieveFlagsForObject is returned when retrieving flags for object fails
	ErrRetrieveFlagsForObject = errors.New("failed to retrieve flags for object")

	// ErrDeleteFlagRecord is returned when deleting flag record fails
	ErrDeleteFlagRecord = errors.New("failed to delete flag record")

	// ErrExtractMovedToTargetFromMove is returned when extracting moved-to target from move activity fails
	ErrExtractMovedToTargetFromMove = errors.New("unable to extract moved-to target from move activity")

	// ErrUndoMoveMissingActor is returned when undo move activity is missing actor
	ErrUndoMoveMissingActor = errors.New("undo move activity missing actor")

	// ErrExtractUsernameFromActorURI is returned when extracting username from actor URI fails
	ErrExtractUsernameFromActorURI = errors.New("unable to extract username from actor URI")

	// ErrClearMovedToField is returned when clearing movedTo field fails
	ErrClearMovedToField = errors.New("failed to clear movedTo field")

	// ErrExtractObjectIDFromActivity is returned when extracting object ID from activity fails
	ErrExtractObjectIDFromActivity = errors.New("unable to extract object ID from activity")

	// ErrUndoActivityMissingActor is returned when undo activity is missing actor
	ErrUndoActivityMissingActor = errors.New("undo activity missing actor")

	// ErrExtractListIDFromTargetCollection is returned when extracting list ID from target collection fails
	ErrExtractListIDFromTargetCollection = errors.New("unable to extract list ID from target collection")

	// ErrGetTargetList is returned when getting target list fails
	ErrGetTargetList = errors.New("failed to get target list")

	// ErrActorNoPermissionModifyList is returned when actor does not have permission to modify list
	ErrActorNoPermissionModifyList = errors.New("actor does not have permission to modify list")

	// ErrExtractUsernameFromObjectID is returned when extracting username from object ID fails
	ErrExtractUsernameFromObjectID = errors.New("unable to extract username from object ID")

	// ErrPerformListOperation is returned when list operation fails
	ErrPerformListOperation = errors.New("failed to perform list operation")

	// Block activity errors
	// ErrBlockMissingObjectID is returned when block activity object is missing id field
	ErrBlockMissingObjectID = errors.New("block activity object missing id field")

	// ErrBlockInvalidObjectType is returned when block activity has invalid object type
	ErrBlockInvalidObjectType = errors.New("block activity has invalid object type")

	// ErrBlockMissingBlockedActor is returned when block activity is missing blocked actor
	ErrBlockMissingBlockedActor = errors.New("block activity missing blocked actor")

	// ErrBlockMissingBlockerActor is returned when block activity is missing blocker actor
	ErrBlockMissingBlockerActor = errors.New("block activity missing blocker actor")

	// ErrCreateBlockRelationship is returned when creating block relationship fails
	ErrCreateBlockRelationship = errors.New("failed to create block relationship")

	// Flag activity errors
	// ErrExtractFlaggedObjectFromFlag is returned when extracting flagged object from Flag activity fails
	ErrExtractFlaggedObjectFromFlag = errors.New("unable to extract flagged object from Flag activity")

	// ErrNoFlaggedObjectsFound is returned when no flagged objects are found in Flag activity
	ErrNoFlaggedObjectsFound = errors.New("no flagged objects found in Flag activity")

	// ErrCreateFlagRecord is returned when creating flag record fails
	ErrCreateFlagRecord = errors.New("failed to create flag record")

	// Move activity errors
	// ErrMoveMustSpecifyTarget is returned when move activity must specify a target account
	ErrMoveMustSpecifyTarget = errors.New("move activity must specify a target account")

	// ErrExtractUsernameFromOldActorURI is returned when extracting username from old actor URI fails
	ErrExtractUsernameFromOldActorURI = errors.New("unable to extract username from old actor URI")

	// ErrUpdateMovedToField is returned when updating movedTo field fails
	ErrUpdateMovedToField = errors.New("failed to update movedTo field")

	// Collection activity errors (Add/Remove)
	// ErrActivityMissingTargetCollection is returned when activity is missing target collection
	ErrActivityMissingTargetCollection = errors.New("activity missing target collection")

	// ErrExtractObjectFromActivity is returned when extracting object from activity fails
	ErrExtractObjectFromActivity = errors.New("unable to extract object from activity")

	// ErrNoObjectsFoundInActivity is returned when no objects are found in activity
	ErrNoObjectsFoundInActivity = errors.New("no objects found in activity")

	// Target-specific activity errors
	// ErrExtractTargetIDFromActivity is returned when extracting target ID from activity fails
	ErrExtractTargetIDFromActivity = errors.New("unable to extract target ID from activity")

	// ErrDeleteActivityRecord is returned when deleting activity record fails
	ErrDeleteActivityRecord = errors.New("failed to delete activity record")

	// Timeline processing errors
	// ErrExtractUsernameFromActorID is returned when extracting username from actor ID fails
	ErrExtractUsernameFromActorID = errors.New("failed to extract username from actor ID")

	// ErrGetFollowers is returned when getting followers fails
	ErrGetFollowers = errors.New("failed to get followers")

	// Federation service errors
	// ErrUnsupportedDatabaseType is returned when database type is not supported
	ErrUnsupportedDatabaseType = errors.New("unsupported database type")

	// ErrNoDatabaseAvailable is returned when no database is available
	ErrNoDatabaseAvailable = errors.New("no database available")

	// ErrActivityMissingActor is returned when activity is missing actor
	ErrActivityMissingActor = errors.New("activity missing actor")

	// ErrInvalidActorIDFormat is returned when actor ID format is invalid
	ErrInvalidActorIDFormat = errors.New("invalid actor ID format")

	// Job queue service errors
	// ErrAWSConfigLoad is returned when AWS config loading fails
	ErrAWSConfigLoad = errors.New("failed to load AWS config")

	// ErrImportJobSerialization is returned when import job serialization fails
	ErrImportJobSerialization = errors.New("failed to serialize import job")

	// ErrImportJobQueue is returned when import job queuing fails
	ErrImportJobQueue = errors.New("failed to queue import job")

	// ErrExportJobSerialization is returned when export job serialization fails
	ErrExportJobSerialization = errors.New("failed to serialize export job")

	// ErrExportJobQueue is returned when export job queuing fails
	ErrExportJobQueue = errors.New("failed to queue export job")

	// ErrMediaJobSerialization is returned when media job serialization fails
	ErrMediaJobSerialization = errors.New("failed to serialize media job")

	// ErrMediaJobQueue is returned when media job queuing fails
	ErrMediaJobQueue = errors.New("failed to queue media job")

	// ErrScheduledJobSerialization is returned when scheduled job serialization fails
	ErrScheduledJobSerialization = errors.New("failed to serialize scheduled job")

	// ErrScheduledJobQueue is returned when scheduled job queuing fails
	ErrScheduledJobQueue = errors.New("failed to queue scheduled job")

	// ErrActivityJobSerialization is returned when activity job serialization fails
	ErrActivityJobSerialization = errors.New("failed to serialize activity job")

	// ErrActivityJobQueue is returned when activity job queuing fails
	ErrActivityJobQueue = errors.New("failed to queue activity job")

	// ErrQueueURLNotConfigured is returned when queue URL is not configured
	ErrQueueURLNotConfigured = errors.New("queue URL not configured")

	// ErrMessageSerialization is returned when message serialization fails
	ErrMessageSerialization = errors.New("failed to serialize message")

	// ErrDelayedJobQueue is returned when delayed job queuing fails
	ErrDelayedJobQueue = errors.New("failed to queue delayed job")

	// ErrBatchMessageSend is returned when batch message sending fails
	ErrBatchMessageSend = errors.New("failed to send batch messages")

	// ErrBatchOperation is returned when batch operation fails
	ErrBatchOperation = errors.New("batch operation failed")

	// ErrQueueAttributeQuery is returned when queue attribute query fails
	ErrQueueAttributeQuery = errors.New("failed to query queue attributes")

	// Lists service errors
	// ErrListValidationFailed is returned when list validation fails
	ErrListValidationFailed = errors.New("validation failed")

	// ErrListCreateFailed is returned when list creation fails
	ErrListCreateFailed = errors.New("failed to create list")

	// ErrListGetFailed is returned when list retrieval fails
	ErrListGetFailed = errors.New("failed to get list")

	// ErrListUpdateFailed is returned when list update fails
	ErrListUpdateFailed = errors.New("failed to update list")

	// ErrListDeleteFailed is returned when list deletion fails
	ErrListDeleteFailed = errors.New("failed to delete list")

	// ErrListMembershipCheckFailed is returned when list membership check fails
	ErrListMembershipCheckFailed = errors.New("failed to check membership")

	// ErrListMemberAddFailed is returned when adding member to list fails
	ErrListMemberAddFailed = errors.New("failed to add member to list")

	// ErrListMemberRemoveFailed is returned when removing member from list fails
	ErrListMemberRemoveFailed = errors.New("failed to remove member from list")

	// ErrListNotFound is returned when list is not found
	ErrListNotFound = errors.New("list not found")

	// ErrGetUserLists is returned when getting user lists fails
	ErrGetUserLists = errors.New("failed to get user lists")

	// ErrGetListTimeline is returned when getting list timeline fails
	ErrGetListTimeline = errors.New("failed to get list timeline")

	// ErrGetListMembers is returned when getting list members fails
	ErrGetListMembers = errors.New("failed to get list members")

	// List validation errors
	// ErrListUsernameRequired is returned when username is missing
	ErrListUsernameRequired = errors.New("username is required")

	// ErrListCreatorIDRequired is returned when creator ID is missing
	ErrListCreatorIDRequired = errors.New("creator_id is required")

	// ErrListTitleRequired is returned when title is missing
	ErrListTitleRequired = errors.New("title is required")

	// ErrListTitleEmpty is returned when title is empty
	ErrListTitleEmpty = errors.New("title cannot be empty")

	// ErrListIDRequired is returned when list ID is missing
	ErrListIDRequired = errors.New("list_id is required")

	// ErrListUpdaterIDRequired is returned when updater ID is missing
	ErrListUpdaterIDRequired = errors.New("updater_id is required")

	// ErrListDeleterIDRequired is returned when deleter ID is missing
	ErrListDeleterIDRequired = errors.New("deleter_id is required")

	// ErrListMemberUsernameRequired is returned when member username is missing
	ErrListMemberUsernameRequired = errors.New("member_username is required")

	// ErrListAdderIDRequired is returned when adder ID is missing
	ErrListAdderIDRequired = errors.New("adder_id is required")

	// ErrListRemoverIDRequired is returned when remover ID is missing
	ErrListRemoverIDRequired = errors.New("remover_id is required")

	// Notes service errors
	// ErrNotesValidationFailed is returned when notes validation fails
	ErrNotesValidationFailed = errors.New("validation failed")

	// ErrGetAuthorAccount is returned when getting author account fails
	ErrGetAuthorAccount = errors.New("failed to get author account")

	// ErrGetStatus is returned when status retrieval fails
	ErrGetStatus = errors.New("failed to get status")

	// ErrUpdateStatus is returned when status update fails
	ErrUpdateStatus = errors.New("failed to update status")

	// ErrDeleteStatus is returned when status deletion fails
	ErrDeleteStatus = errors.New("failed to delete status")

	// ErrStatusNotFound is returned when status is not found
	ErrStatusNotFound = errors.New("status not found")

	// ErrStatusIDRequired is returned when status ID is required but missing
	ErrStatusIDRequired = errors.New("status_id is required")

	// ErrCheckViewPermissions is returned when checking view permissions fails
	ErrCheckViewPermissions = errors.New("failed to check view permissions")

	// ErrCheckFollowingRelationship is returned when checking following relationship fails
	ErrCheckFollowingRelationship = errors.New("failed to check following relationship")

	// ErrHomeTimelineRequiresViewerID is returned when home timeline requires viewer_id
	ErrHomeTimelineRequiresViewerID = errors.New("home timeline requires viewer_id")

	// ErrUserTimelineRequiresAuthorID is returned when user timeline requires author_id
	ErrUserTimelineRequiresAuthorID = errors.New("user timeline requires author_id")

	// ErrConversationsTimelineRequiresConversationID is returned when conversations timeline requires conversation_id
	ErrConversationsTimelineRequiresConversationID = errors.New("conversations timeline requires conversation_id")

	// ErrDirectTimelineRequiresViewerID is returned when direct timeline requires viewer_id
	ErrDirectTimelineRequiresViewerID = errors.New("direct timeline requires viewer_id")

	// ErrHashtagTimelineRequiresHashtag is returned when hashtag timeline requires hashtag
	ErrHashtagTimelineRequiresHashtag = errors.New("hashtag timeline requires hashtag")

	// ErrListTimelineRequiresListID is returned when list timeline requires list_id
	ErrListTimelineRequiresListID = errors.New("list timeline requires list_id")

	// ErrUnsupportedTimelineType is returned when timeline type is unsupported
	ErrUnsupportedTimelineType = errors.New("unsupported timeline type")

	// ErrGetTimeline is returned when timeline retrieval fails
	ErrGetTimeline = errors.New("failed to get timeline")

	// ErrStatusContentValidationFailed is returned when status content validation fails
	ErrStatusContentValidationFailed = errors.New("status content validation failed")

	// ErrVisibilityValidationFailed is returned when visibility validation fails
	ErrVisibilityValidationFailed = errors.New("visibility validation failed")

	// ErrSpoilerTextValidationFailed is returned when spoiler text validation fails
	ErrSpoilerTextValidationFailed = errors.New("spoiler text validation failed")

	// ErrInvalidInReplyToID is returned when in_reply_to_id is invalid
	ErrInvalidInReplyToID = errors.New("invalid in_reply_to_id")

	// ErrContentCannotBeEmpty is returned when content cannot be empty
	ErrContentCannotBeEmpty = errors.New("content cannot be empty")

	// ErrContentTooLong is returned when content is too long
	ErrContentTooLong = errors.New("content too long (max 5000 characters)")

	// ErrContentTooLongShort is returned when content is too long for short form
	ErrContentTooLongShort = errors.New("content too long (max 500 characters)")

	// ErrBookmarkStatus is returned when bookmarking status fails
	ErrBookmarkStatus = errors.New("failed to bookmark status")

	// ErrUnbookmarkStatus is returned when unbookmarking status fails
	ErrUnbookmarkStatus = errors.New("failed to unbookmark status")

	// ErrGetBookmarks is returned when getting bookmarks fails
	ErrGetBookmarks = errors.New("failed to get bookmarks")

	// ErrGetLikers is returned when getting likers fails
	ErrGetLikers = errors.New("failed to get likers")

	// ErrGetRebloggerAccount is returned when getting reblogger account fails
	ErrGetRebloggerAccount = errors.New("failed to get reblogger account")

	// ErrReblogStatus is returned when reblogging status fails
	ErrReblogStatus = errors.New("failed to reblog status")

	// ErrGetRebloggers is returned when getting rebloggers fails
	ErrGetRebloggers = errors.New("failed to get rebloggers")

	// ErrMuteStatus is returned when muting status fails
	ErrMuteStatus = errors.New("failed to mute status")

	// ErrUnmuteStatus is returned when unmuting status fails
	ErrUnmuteStatus = errors.New("failed to unmute status")

	// ErrCreateLike is returned when creating like fails
	ErrCreateLike = errors.New("failed to create like")

	// ErrDeleteLike is returned when deleting like fails
	ErrDeleteLike = errors.New("failed to delete like")

	// ErrGetLikes is returned when getting likes fails
	ErrGetLikes = errors.New("failed to get likes")

	// ErrCreateReblog is returned when creating reblog fails
	ErrCreateReblog = errors.New("failed to create reblog")

	// ErrDeleteReblog is returned when deleting reblog fails
	ErrDeleteReblog = errors.New("failed to delete reblog")

	// ErrGetAnnounces is returned when getting announces fails
	ErrGetAnnounces = errors.New("failed to get announces")

	// ErrPinStatus is returned when pinning status fails
	ErrPinStatus = errors.New("failed to pin status")

	// ErrUnpinStatus is returned when unpinning status fails
	ErrUnpinStatus = errors.New("failed to unpin status")

	// ErrConversationServiceNotAvailable is returned when conversation service is not available
	ErrConversationServiceNotAvailable = errors.New("conversation service not available")

	// ErrMuteConversation is returned when muting conversation fails
	ErrMuteConversation = errors.New("failed to mute conversation")

	// ErrUnmuteConversation is returned when unmuting conversation fails
	ErrUnmuteConversation = errors.New("failed to unmute conversation")

	// ErrGetConversations is returned when getting conversations fails
	ErrGetConversations = errors.New("failed to get conversations")

	// ErrViewerIDRequiredForFavoritedTimeline is returned when viewer_id is required for favorited timeline
	ErrViewerIDRequiredForFavoritedTimeline = errors.New("viewer_id is required for favorited timeline")

	// ErrGetViewerAccount is returned when getting viewer account fails
	ErrGetViewerAccount = errors.New("failed to get viewer account")

	// ErrLikeRepositoryNotAvailable is returned when like repository is not available
	ErrLikeRepositoryNotAvailable = errors.New("like repository not available")

	// ErrGetLikedObjects is returned when getting liked objects fails
	ErrGetLikedObjects = errors.New("failed to get liked objects")

	// ErrGetStatuses is returned when getting statuses fails
	ErrGetStatuses = errors.New("failed to get statuses")

	// ErrCreateScheduledStatus is returned when creating scheduled status fails
	ErrCreateScheduledStatus = errors.New("failed to create scheduled status")

	// ErrScheduledTimeInPast is returned when scheduled time must be in the future
	ErrScheduledTimeInPast = errors.New("scheduled time must be in the future")

	// ErrMediaAttachmentWithID is returned when media attachment operation fails with specific ID
	ErrMediaAttachmentWithID = errors.New("media attachment operation failed")

	// ErrGetSearchSuggestions is returned when getting search suggestions fails
	ErrGetSearchSuggestions = errors.New("failed to get search suggestions")

	// ErrCreateCommunityNote is returned when creating community note fails
	ErrCreateCommunityNote = errors.New("failed to create community note")

	// ErrGetVisibleCommunityNotes is returned when getting visible community notes fails
	ErrGetVisibleCommunityNotes = errors.New("failed to get visible community notes")

	// ErrGetCommunityNote is returned when getting community note fails
	ErrGetCommunityNote = errors.New("failed to get community note")

	// ErrCreateCommunityNoteVote is returned when creating community note vote fails
	ErrCreateCommunityNoteVote = errors.New("failed to create community note vote")

	// ErrGetCommunityNotesByAuthor is returned when getting community notes by author fails
	ErrGetCommunityNotesByAuthor = errors.New("failed to get community notes by author")

	// ErrCountStatusesByAuthor is returned when counting statuses by author fails
	ErrCountStatusesByAuthor = errors.New("failed to count statuses by author")

	// ErrGetUserTimeline is returned when getting user timeline fails
	ErrGetUserTimeline = errors.New("failed to get user timeline")

	// ErrCountReplies is returned when counting replies fails
	ErrCountReplies = errors.New("failed to count replies")

	// ErrGetBoostCount is returned when getting boost count fails
	ErrGetBoostCount = errors.New("failed to get boost count")

	// ErrGetLikeCount is returned when getting like count fails
	ErrGetLikeCount = errors.New("failed to get like count")

	// ErrCheckUserHasLiked is returned when checking if user has liked fails
	ErrCheckUserHasLiked = errors.New("failed to check if user has liked")

	// ErrCheckUserHasReblogged is returned when checking if user has reblogged fails
	ErrCheckUserHasReblogged = errors.New("failed to check if user has reblogged")

	// ErrCheckUserHasBookmarked is returned when checking if user has bookmarked fails
	ErrCheckUserHasBookmarked = errors.New("failed to check if user has bookmarked")

	// List permission errors
	// ErrListUnauthorizedCreate is returned when user cannot create list for another user
	ErrListUnauthorizedCreate = errors.New("cannot create list for another user")

	// ErrListUnauthorizedUpdate is returned when user cannot update list owned by another user
	ErrListUnauthorizedUpdate = errors.New("cannot update list owned by another user")

	// ErrListUnauthorizedDelete is returned when user cannot delete list owned by another user
	ErrListUnauthorizedDelete = errors.New("cannot delete list owned by another user")

	// ErrListUnauthorizedAddMember is returned when user cannot add members to list owned by another user
	ErrListUnauthorizedAddMember = errors.New("cannot add members to list owned by another user")

	// ErrListUnauthorizedRemoveMember is returned when user cannot remove members from list owned by another user
	ErrListUnauthorizedRemoveMember = errors.New("cannot remove members from list owned by another user")

	// ErrListUnauthorizedView is returned when user cannot view list owned by another user
	ErrListUnauthorizedView = errors.New("cannot view list owned by another user")

	// ErrListUnauthorizedViewLists is returned when user cannot view lists for another user
	ErrListUnauthorizedViewLists = errors.New("cannot view lists for another user")

	// ErrListUnauthorizedViewTimeline is returned when user cannot view timeline for list owned by another user
	ErrListUnauthorizedViewTimeline = errors.New("cannot view timeline for list owned by another user")

	// ErrListUnauthorizedViewMembers is returned when user cannot view members of list owned by another user
	ErrListUnauthorizedViewMembers = errors.New("cannot view members of list owned by another user")

	// Emoji service errors
	// ErrEmojiNotFound is returned when emoji is not found
	ErrEmojiNotFound = errors.New("emoji not found")

	// ErrGetEmoji is returned when emoji retrieval fails
	ErrGetEmoji = errors.New("failed to get emoji")

	// ErrListEmojis is returned when emoji listing fails
	ErrListEmojis = errors.New("failed to list emojis")

	// ErrEmojiAlreadyExists is returned when emoji with shortcode already exists
	ErrEmojiAlreadyExists = errors.New("emoji already exists")

	// ErrCreateEmoji is returned when emoji creation fails
	ErrCreateEmoji = errors.New("failed to create emoji")

	// ErrCannotUpdateRemoteEmoji is returned when attempting to update a remote emoji
	ErrCannotUpdateRemoteEmoji = errors.New("cannot update remote emoji")

	// ErrUpdateEmoji is returned when emoji update fails
	ErrUpdateEmoji = errors.New("failed to update emoji")

	// ErrCannotDeleteRemoteEmoji is returned when attempting to delete a remote emoji
	ErrCannotDeleteRemoteEmoji = errors.New("cannot delete remote emoji")

	// ErrDeleteEmoji is returned when emoji deletion fails
	ErrDeleteEmoji = errors.New("failed to delete emoji")

	// ErrRemoteEmojiNotFound is returned when remote emoji is not found
	ErrRemoteEmojiNotFound = errors.New("remote emoji not found")

	// ErrGetRemoteEmoji is returned when remote emoji retrieval fails
	ErrGetRemoteEmoji = errors.New("failed to get remote emoji")

	// ErrCreateLocalEmojiCopy is returned when creating local emoji copy fails
	ErrCreateLocalEmojiCopy = errors.New("failed to create local emoji copy")

	// ErrSearchEmojis is returned when emoji search fails
	ErrSearchEmojis = errors.New("failed to search emojis")

	// ErrGetPopularEmojis is returned when getting popular emojis fails
	ErrGetPopularEmojis = errors.New("failed to get popular emojis")

	// ErrIncrementEmojiUsage is returned when incrementing emoji usage fails
	ErrIncrementEmojiUsage = errors.New("failed to increment emoji usage")

	// ErrInvalidShortcode is returned when shortcode validation fails
	ErrInvalidShortcode = errors.New("invalid shortcode")

	// ErrReservedShortcode is returned when shortcode is reserved
	ErrReservedShortcode = errors.New("shortcode is reserved")

	// Scheduled status media attachment errors
	// ErrMediaAttachmentNotFound is returned when media attachment is not found or inaccessible
	ErrMediaAttachmentNotFound = errors.New("media attachment not found or inaccessible")

	// ErrMediaAttachmentNotReady is returned when media attachment is not ready
	ErrMediaAttachmentNotReady = errors.New("media attachment not ready")

	// ErrMediaAttachmentExpired is returned when media attachment has expired
	ErrMediaAttachmentExpired = errors.New("media attachment has expired")

	// ErrRetrieveMediaAttachment is returned when retrieving media attachment fails
	ErrRetrieveMediaAttachment = errors.New("failed to retrieve media attachment")

	// ErrValidationFailed is returned when validation fails
	ErrValidationFailed = errors.New("validation failed")

	// Import/Export service errors
	// Export operation errors
	// ErrExportValidationFailed is returned when export validation fails
	ErrExportValidationFailed = errors.New("export validation failed")

	// ErrCreateExport is returned when export creation fails
	ErrCreateExport = errors.New("failed to create export")

	// ErrQueueExport is returned when export queueing fails
	ErrQueueExport = errors.New("failed to queue export")

	// ErrGetExport is returned when export retrieval fails
	ErrGetExport = errors.New("failed to get export")

	// ErrExportAccessForbidden is returned when user cannot access export
	ErrExportAccessForbidden = errors.New("user cannot access export")

	// ErrListExports is returned when export listing fails
	ErrListExports = errors.New("failed to list exports")

	// ErrUpdateExportProgress is returned when export progress update fails
	ErrUpdateExportProgress = errors.New("failed to update export progress")

	// ErrUpdateExportStatus is returned when export status update fails
	ErrUpdateExportStatus = errors.New("failed to update export status")

	// ErrExportNotFound is returned when export is not found
	ErrExportNotFound = errors.New("export not found")

	// ErrNotAuthorizedCancelExport is returned when user is not authorized to cancel export
	ErrNotAuthorizedCancelExport = errors.New("not authorized to cancel this export")

	// ErrCannotCancelCompletedExport is returned when trying to cancel completed export
	ErrCannotCancelCompletedExport = errors.New("cannot cancel completed export")

	// ErrExportAlreadyCancelled is returned when export is already cancelled
	ErrExportAlreadyCancelled = errors.New("export is already cancelled")

	// ErrCannotCancelFailedExport is returned when trying to cancel failed export
	ErrCannotCancelFailedExport = errors.New("cannot cancel failed export")

	// ErrCancelExport is returned when export cancellation fails
	ErrCancelExport = errors.New("failed to cancel export")

	// ErrGetCancelledExport is returned when getting cancelled export fails
	ErrGetCancelledExport = errors.New("failed to get cancelled export")

	// Import operation errors
	// ErrCreateImport is returned when import creation fails
	ErrCreateImport = errors.New("failed to create import")

	// ErrImportNotFound is returned when import is not found
	ErrImportNotFound = errors.New("import not found")

	// ErrNotAuthorizedAccessImport is returned when user is not authorized to access import
	ErrNotAuthorizedAccessImport = errors.New("not authorized to access this import")

	// ErrListImports is returned when import listing fails
	ErrListImports = errors.New("failed to list imports")

	// Export validation errors
	// ErrUserNotFound is returned when user is not found during validation
	ErrUserNotFound = errors.New("user not found")

	// ErrInvalidDateRangeOrder is returned when start date is after end date
	ErrInvalidDateRangeOrder = errors.New("invalid date range: start date after end date")

	// ErrInvalidDateRangeFuture is returned when end date is in the future
	ErrInvalidDateRangeFuture = errors.New("invalid date range: end date in the future")

	// Search service errors
	// ErrSearchAccounts is returned when account search operation fails
	ErrSearchAccounts = errors.New("failed to search accounts")

	// ErrSearchHashtags is returned when hashtag search operation fails
	ErrSearchHashtags = errors.New("failed to search hashtags")

	// ErrSearchStatuses is returned when status search operation fails
	ErrSearchStatuses = errors.New("failed to search statuses")

	// ErrGetDirectory is returned when directory retrieval fails
	ErrGetDirectory = errors.New("failed to get directory")

	// ErrGetSuggestions is returned when suggestions retrieval fails
	ErrGetSuggestions = errors.New("failed to get suggestions")

	// ErrRemoveSuggestion is returned when suggestion removal fails
	ErrRemoveSuggestion = errors.New("failed to remove suggestion")

	// Cost analytics service errors
	// ErrGetAICostData is returned when AI cost data retrieval fails
	ErrGetAICostData = errors.New("failed to get AI cost data")

	// ErrUnsupportedMetric is returned when an unsupported metric type is requested
	ErrUnsupportedMetric = errors.New("unsupported metric")

	// ErrInsufficientHistoricalData is returned when insufficient historical data for prediction
	ErrInsufficientHistoricalData = errors.New("insufficient historical data for prediction (need at least 7 points)")

	// Bulk operations service errors
	// ErrBulkOperationNotFound is returned when bulk operation is not found
	ErrBulkOperationNotFound = errors.New("operation not found")

	// ErrBulkOperationInvalidData is returned when bulk operation data is invalid
	ErrBulkOperationInvalidData = errors.New("invalid operation data")

	// ErrBulkOperationUnauthorizedAccess is returned when user cannot access bulk operation
	ErrBulkOperationUnauthorizedAccess = errors.New("unauthorized access to bulk operation")

	// ErrBulkContentNotFound is returned when bulk content is not found
	ErrBulkContentNotFound = errors.New("bulk content not found")

	// ErrBulkContentUnauthorizedDelete is returned when user is not authorized to delete content
	ErrBulkContentUnauthorizedDelete = errors.New("not authorized to delete content")
)

Activity processing errors

Functions

func GetHTTPStatus

func GetHTTPStatus(err error) int

GetHTTPStatus extracts the HTTP status code from an error

func HasCategory

func HasCategory(err error, category ErrorCategory) bool

HasCategory checks if the error has the specified category

func HasCode

func HasCode(err error, code ErrorCode) bool

HasCode checks if the error has the specified code

func IsAppError

func IsAppError(err error) bool

IsAppError checks if an error is an AppError

func IsClientError

func IsClientError(err error) bool

IsClientError checks if an error is a client error (4xx HTTP status).

func IsRetryable

func IsRetryable(err error) bool

IsRetryable checks if the error is marked as retryable

func IsRetryableError

func IsRetryableError(err error) bool

IsRetryableError checks if an error is retryable.

func IsServerError

func IsServerError(err error) bool

IsServerError checks if an error is a server error (5xx HTTP status).

func IsTemporaryError

func IsTemporaryError(err error) bool

IsTemporaryError checks if an error is temporary and should be retried.

Types

type AppError

type AppError struct {
	// Code is the standardized error code for programmatic handling
	Code ErrorCode `json:"code"`

	// Category is the domain/category this error belongs to
	Category ErrorCategory `json:"category"`

	// Message is the user-friendly error message
	Message string `json:"message"`

	// InternalMessage contains detailed technical information for debugging
	InternalMessage string `json:"-"`

	// InternalError is the underlying error that caused this AppError
	InternalError error `json:"-"`

	// Metadata contains additional structured information about the error
	Metadata map[string]interface{} `json:"metadata,omitempty"`

	// HTTPStatusCode is the appropriate HTTP status code for this error
	HTTPStatusCode int `json:"-"`

	// Timestamp records when this error was created
	Timestamp time.Time `json:"timestamp"`

	// Retryable indicates whether this error represents a condition that might succeed on retry
	Retryable bool `json:"retryable"`

	// Stack contains the stack trace for debugging (only in development)
	Stack string `json:"-"`
}

AppError represents a comprehensive application error that separates internal details from user-facing messages and provides structured information for logging, monitoring, and debugging.

func AIProcessorAnalysisFailed

func AIProcessorAnalysisFailed() *AppError

AIProcessorAnalysisFailed creates an error indicating AI analysis failed.

func AIProcessorAnalysisSaveFailed

func AIProcessorAnalysisSaveFailed() *AppError

AIProcessorAnalysisSaveFailed creates an error indicating failed to save AI analysis.

func AIProcessorContentExtractionFailed

func AIProcessorContentExtractionFailed() *AppError

AIProcessorContentExtractionFailed creates an error indicating failed to extract content from stream record.

func AIProcessorInvalidObjectPK

func AIProcessorInvalidObjectPK() *AppError

AIProcessorInvalidObjectPK creates an error indicating invalid object primary key format.

func AIProcessorNotAnalyzableType

func AIProcessorNotAnalyzableType() *AppError

AIProcessorNotAnalyzableType creates an error indicating object type is not analyzable.

func AIProcessorStreamUnmarshalFailed

func AIProcessorStreamUnmarshalFailed() *AppError

AIProcessorStreamUnmarshalFailed creates an error indicating failed to unmarshal stream record.

func AWSConfigLoadFailed

func AWSConfigLoadFailed(err error) *AppError

AWSConfigLoadFailed creates an error indicating AWS config loading failed.

func AccessDenied

func AccessDenied(resource string) *AppError

AccessDenied creates an error indicating access to a resource is denied.

func AccessDeniedForResource

func AccessDeniedForResource(resourceType, resourceID string) *AppError

AccessDeniedForResource creates an error indicating access was denied for a resource.

func AccessTokenGenerationFailed

func AccessTokenGenerationFailed(err error) *AppError

AccessTokenGenerationFailed creates an error indicating access token generation failed.

func AccountAlreadyPinned

func AccountAlreadyPinned(targetUsername string) *AppError

AccountAlreadyPinned creates an error when account is already pinned.

func AccountNoActivityPubActor

func AccountNoActivityPubActor(username string) *AppError

AccountNoActivityPubActor creates an error when account has no ActivityPub actor.

func AccountRateLimitCheckFailed

func AccountRateLimitCheckFailed(err error) *AppError

AccountRateLimitCheckFailed creates an error indicating account rate limit check failed.

func AccountRateLimitExceeded

func AccountRateLimitExceeded(resetTime int64) *AppError

AccountRateLimitExceeded creates an error indicating too many failed attempts for an account.

func ActivityDirectionUnknown

func ActivityDirectionUnknown(direction string) *AppError

ActivityDirectionUnknown creates an error for unknown activity directions.

func ActivityInvalidField

func ActivityInvalidField(field, reason string) *AppError

ActivityInvalidField creates an error indicating an ActivityPub activity has an invalid field.

func ActivityMissingField

func ActivityMissingField(field string) *AppError

ActivityMissingField creates an error indicating an ActivityPub activity is missing a required field.

func ActivityNotFound

func ActivityNotFound(activityID string) *AppError

ActivityNotFound creates an error indicating an activity was not found.

func ActivityNotFoundLocally

func ActivityNotFoundLocally(activityID string) *AppError

ActivityNotFoundLocally creates an error when an activity is not found locally.

func ActivityObjectProcessingFailed

func ActivityObjectProcessingFailed(activityType string, err error) *AppError

ActivityObjectProcessingFailed creates an error indicating activity object processing failed.

func ActivityParsingFailed

func ActivityParsingFailed(activityType string, err error) *AppError

ActivityParsingFailed creates an error indicating ActivityPub activity parsing failed.

func ActivityPubActivityTypeEmpty

func ActivityPubActivityTypeEmpty() *AppError

ActivityPubActivityTypeEmpty creates an error indicating activity type cannot be empty.

func ActivityPubActorURIEmpty

func ActivityPubActorURIEmpty() *AppError

ActivityPubActorURIEmpty creates an error indicating actor URI cannot be empty.

func ActivityPubActorURIMustUseHTTPS

func ActivityPubActorURIMustUseHTTPS() *AppError

ActivityPubActorURIMustUseHTTPS creates an error indicating actor URI must use HTTPS.

func ActivityPubInvalidSignature

func ActivityPubInvalidSignature() *AppError

ActivityPubInvalidSignature creates an error indicating invalid signature missing keyId or signature.

func ActivityPubSignatureHeaderEmpty

func ActivityPubSignatureHeaderEmpty() *AppError

ActivityPubSignatureHeaderEmpty creates an error indicating signature header is empty.

func ActivityPubUnsupportedActivityType

func ActivityPubUnsupportedActivityType(activityType string) *AppError

ActivityPubUnsupportedActivityType creates an error indicating unsupported ActivityPub activity type.

func ActivityRecordUnmarshalFailed

func ActivityRecordUnmarshalFailed(err error) *AppError

ActivityRecordUnmarshalFailed creates an error indicating activity record unmarshaling failed.

func ActivityTypeExtractionFailed

func ActivityTypeExtractionFailed(context string, err error) *AppError

ActivityTypeExtractionFailed creates an error for activity type extraction failures.

func ActivityTypeUnsupported

func ActivityTypeUnsupported(activityType string) *AppError

ActivityTypeUnsupported creates an error indicating an unsupported ActivityPub activity type.

func ActorAlreadyExists

func ActorAlreadyExists(username string) *AppError

ActorAlreadyExists creates an error indicating an actor already exists.

func ActorDomainBlocked

func ActorDomainBlocked(domain string) *AppError

ActorDomainBlocked creates an error indicating an actor domain is blocked.

func ActorDomainNotAllowed

func ActorDomainNotAllowed(domain string) *AppError

ActorDomainNotAllowed creates an error indicating an actor domain is not in the allowed list.

func ActorFetchFailed

func ActorFetchFailed(actorID string, err error) *AppError

ActorFetchFailed creates an error indicating failed to fetch a remote actor.

func ActorIDFormatInvalid

func ActorIDFormatInvalid(actorID string) *AppError

ActorIDFormatInvalid creates an error for invalid actor ID formats.

func ActorNotFound

func ActorNotFound(actorID string) *AppError

ActorNotFound creates an error indicating an ActivityPub actor was not found.

func ActorRetrievalFailed

func ActorRetrievalFailed(err error) *AppError

ActorRetrievalFailed creates an error indicating actor retrieval failed.

func ActorURIExtractionFailed

func ActorURIExtractionFailed(context string, err error) *AppError

ActorURIExtractionFailed creates an error for actor URI extraction failures.

func ActorURIInvalid

func ActorURIInvalid(uri string) *AppError

ActorURIInvalid creates an error indicating an invalid actor URI.

func AlreadyExists

func AlreadyExists(itemType string) *AppError

AlreadyExists creates an error when an item already exists.

func AnnounceActivityInvalid

func AnnounceActivityInvalid(reason string) *AppError

AnnounceActivityInvalid creates an error indicating an invalid announce activity.

func AnnounceObjectNotFound

func AnnounceObjectNotFound(objectID string) *AppError

AnnounceObjectNotFound creates an error indicating an announce target object was not found.

func AsAppError

func AsAppError(err error) (*AppError, bool)

AsAppError attempts to convert an error to AppError

func AudioInvalidFormat

func AudioInvalidFormat(format string) *AppError

AudioInvalidFormat creates an error indicating invalid audio format.

func AuditEventMarshalFailed

func AuditEventMarshalFailed(err error) *AppError

AuditEventMarshalFailed creates an error indicating audit event marshalling failed.

func AuditLoggingFailed

func AuditLoggingFailed(err error) *AppError

AuditLoggingFailed creates an error indicating audit logging failed.

func AuditRepositoryUnavailable

func AuditRepositoryUnavailable() *AppError

AuditRepositoryUnavailable creates an error indicating audit repository is not available.

func AuthFailed

func AuthFailed(reason string) *AppError

AuthFailed creates an authentication failed error with the specified reason.

func AuthServiceUnavailable

func AuthServiceUnavailable(err error) *AppError

AuthServiceUnavailable creates an error indicating the authentication service is unavailable.

func BackupFailed

func BackupFailed(err error) *AppError

BackupFailed creates an error indicating database backup failed.

func BadRequest

func BadRequest(message string) *AppError

BadRequest creates a bad request error

func BatchHasRetryableErrors

func BatchHasRetryableErrors(errorCount int) *AppError

BatchHasRetryableErrors creates an error indicating a batch contains retryable errors.

func BatchOperationFailed

func BatchOperationFailed(operation string, err error) *AppError

BatchOperationFailed creates an error indicating a batch operation failed.

func BatchPartialFailure

func BatchPartialFailure(successCount, failureCount int) *AppError

BatchPartialFailure creates an error indicating a batch operation partially failed.

func BatchPartialSuccess

func BatchPartialSuccess(successCount, totalCount int) *AppError

BatchPartialSuccess creates an error indicating batch processing partially succeeded.

func BatchSizeExceeded

func BatchSizeExceeded(size, maxSize int) *AppError

BatchSizeExceeded creates an error indicating batch size exceeds maximum.

func BioTooLong

func BioTooLong(maxLength int) *AppError

BioTooLong creates an error indicating bio is too long.

func BlockActivityInvalid

func BlockActivityInvalid(reason string) *AppError

BlockActivityInvalid creates an error indicating an invalid block activity.

func BlockAlreadyExists

func BlockAlreadyExists(blocker, blocked string) *AppError

BlockAlreadyExists creates an error indicating a block relationship already exists.

func BudgetLimitsInvalid

func BudgetLimitsInvalid() *AppError

BudgetLimitsInvalid creates an error for invalid budget limits.

func BusinessRuleViolated

func BusinessRuleViolated(rule string, context map[string]interface{}) *AppError

BusinessRuleViolated creates an error indicating a business rule was violated.

func CSRFTokenGenerationFailed

func CSRFTokenGenerationFailed(err error) *AppError

CSRFTokenGenerationFailed creates an error indicating CSRF token generation failed.

func CSRFTokenInvalid

func CSRFTokenInvalid() *AppError

CSRFTokenInvalid creates an error indicating a CSRF token is invalid.

func CSRFTokenMissing

func CSRFTokenMissing() *AppError

CSRFTokenMissing creates an error indicating a CSRF token is missing.

func CSRFTokenRotationFailed

func CSRFTokenRotationFailed(err error) *AppError

CSRFTokenRotationFailed creates an error indicating CSRF token rotation failed.

func CSRFValidationFailed

func CSRFValidationFailed() *AppError

CSRFValidationFailed creates an error indicating CSRF validation failed.

func CSVValidationFailed

func CSVValidationFailed(reason string) *AppError

CSVValidationFailed creates an error for CSV validation failures.

func ChallengeRetrievalFailed

func ChallengeRetrievalFailed(err error) *AppError

ChallengeRetrievalFailed creates an error indicating challenge retrieval failed.

func ChallengeStorageFailed

func ChallengeStorageFailed(err error) *AppError

ChallengeStorageFailed creates an error indicating challenge storage failed.

func CircuitBreakerOpen

func CircuitBreakerOpen() *AppError

CircuitBreakerOpen creates an error when circuit breaker is open due to cost limit.

func CircuitBreakerReopened

func CircuitBreakerReopened() *AppError

CircuitBreakerReopened creates an error when circuit breaker is reopened due to high cost.

func CollectionFetchFailed

func CollectionFetchFailed(collectionID string, err error) *AppError

CollectionFetchFailed creates an error indicating failed to fetch a collection.

func CollectionInvalid

func CollectionInvalid(collectionID, reason string) *AppError

CollectionInvalid creates an error indicating an invalid collection.

func CollectionItemInvalid

func CollectionItemInvalid(reason string) *AppError

CollectionItemInvalid creates an error indicating an invalid collection item.

func ConcurrentModification

func ConcurrentModification(resourceType string) *AppError

ConcurrentModification creates an error indicating concurrent modification was detected.

func ConcurrentSessionLimitExceeded

func ConcurrentSessionLimitExceeded() *AppError

ConcurrentSessionLimitExceeded creates an error indicating the maximum concurrent sessions limit has been exceeded.

func ConfigurationInvalid

func ConfigurationInvalid(configKey, reason string) *AppError

ConfigurationInvalid creates an error indicating configuration is invalid.

func ConfigurationMissing

func ConfigurationMissing(configKey string) *AppError

ConfigurationMissing creates an error indicating required configuration is missing.

func ConnectionFailed

func ConnectionFailed(connectionType string, err error) *AppError

ConnectionFailed creates an error indicating connection failed.

func ConstraintViolated

func ConstraintViolated(constraint string, err error) *AppError

ConstraintViolated creates an error indicating a database constraint was violated.

func ContentContainsForbiddenWord

func ContentContainsForbiddenWord(word string) *AppError

ContentContainsForbiddenWord creates an error indicating content contains a forbidden word.

func ContentEmpty

func ContentEmpty(contentType string) *AppError

ContentEmpty creates an error indicating content cannot be empty.

func ContentMustHaveContentOrMedia

func ContentMustHaveContentOrMedia() *AppError

ContentMustHaveContentOrMedia creates an error indicating content must have either text content or media attachments.

func ContentNotAllowed

func ContentNotAllowed(contentType, reason string) *AppError

ContentNotAllowed creates an error indicating content is not allowed.

func ContentTooLong

func ContentTooLong(contentType string, maxLength int) *AppError

ContentTooLong creates an error indicating content exceeds maximum length.

func ContentTypeNotAllowed

func ContentTypeNotAllowed(contentType string) *AppError

ContentTypeNotAllowed creates an error when content type is not allowed.

func ContentValidationFailed

func ContentValidationFailed(field, reason string) *AppError

ContentValidationFailed creates an error for content validation failures.

func CookieEntropyGenerationFailed

func CookieEntropyGenerationFailed(err error) *AppError

CookieEntropyGenerationFailed creates an error indicating cookie entropy generation failed.

func CostAggregatorAggregationFailed

func CostAggregatorAggregationFailed() *AppError

CostAggregatorAggregationFailed creates an error indicating failed to aggregate costs.

func CostAggregatorCloudWatchMetric

func CostAggregatorCloudWatchMetric() *AppError

CostAggregatorCloudWatchMetric creates an error indicating failed to put CloudWatch metric.

func CostAggregatorEventMarshal

func CostAggregatorEventMarshal() *AppError

CostAggregatorEventMarshal creates an error indicating failed to marshal aggregation event.

func CostAggregatorLambdaFunctionError

func CostAggregatorLambdaFunctionError() *AppError

CostAggregatorLambdaFunctionError creates an error indicating lambda function returned error.

func CostAggregatorLambdaInvoke

func CostAggregatorLambdaInvoke() *AppError

CostAggregatorLambdaInvoke creates an error indicating failed to invoke lambda and send SQS message.

func CostAggregatorSNSMessageMarshal

func CostAggregatorSNSMessageMarshal() *AppError

CostAggregatorSNSMessageMarshal creates an error indicating failed to marshal SNS message.

func CostAggregatorSNSPublish

func CostAggregatorSNSPublish() *AppError

CostAggregatorSNSPublish creates an error indicating failed to publish SNS message.

func CostLimitApproaching

func CostLimitApproaching(functionName string, currentCost float64, limit float64) *AppError

CostLimitApproaching creates an error indicating Lambda cost limit is approaching.

func CostLimitExceeded

func CostLimitExceeded(operation string, cost float64) *AppError

CostLimitExceeded creates an error indicating cost limit was exceeded.

func CostTrackingFailed

func CostTrackingFailed(operation string, err error) *AppError

CostTrackingFailed creates an error indicating cost tracking failed.

func CostTrackingInitFailed

func CostTrackingInitFailed(err error) *AppError

CostTrackingInitFailed creates an error indicating cost tracking initialization failed.

func CreateActivityInvalid

func CreateActivityInvalid(reason string) *AppError

CreateActivityInvalid creates an error indicating an invalid create activity.

func CreateFailed

func CreateFailed(itemType string, err error) *AppError

CreateFailed creates an error indicating item creation failed.

func CreateObjectInvalid

func CreateObjectInvalid(reason string) *AppError

CreateObjectInvalid creates an error indicating an invalid create object.

func CreateObjectMissing

func CreateObjectMissing() *AppError

CreateObjectMissing creates an error indicating a create activity is missing its object.

func CredentialCreationFailed

func CredentialCreationFailed(err error) *AppError

CredentialCreationFailed creates an error indicating credential creation failed.

func CredentialNotFound

func CredentialNotFound() *AppError

CredentialNotFound creates an error indicating an authentication credential was not found.

func CredentialResponseParseFailed

func CredentialResponseParseFailed(err error) *AppError

CredentialResponseParseFailed creates an error indicating credential response parsing failed.

func CredentialRetrievalFailed

func CredentialRetrievalFailed(err error) *AppError

CredentialRetrievalFailed creates an error indicating credential retrieval failed.

func CredentialStorageFailed

func CredentialStorageFailed(err error) *AppError

CredentialStorageFailed creates an error indicating credential storage failed.

func CredentialValidationFailed

func CredentialValidationFailed(err error) *AppError

CredentialValidationFailed creates an error indicating credential validation failed.

func DLQMessageSendFailed

func DLQMessageSendFailed(messageID string, err error) *AppError

DLQMessageSendFailed creates an error indicating failed to send message to DLQ.

func DLQProcessingFailed

func DLQProcessingFailed(messageID string, err error) *AppError

DLQProcessingFailed creates an error indicating DLQ message processing failed.

func DLQRetryExhausted

func DLQRetryExhausted(messageID string, maxAttempts int) *AppError

DLQRetryExhausted creates an error indicating DLQ retry attempts were exhausted.

func DataCorrupted

func DataCorrupted(dataType string) *AppError

DataCorrupted creates an error indicating data corruption was detected.

func DataInconsistent

func DataInconsistent(context string) *AppError

DataInconsistent creates an error indicating data inconsistency was detected.

func DataIntegrityViolated

func DataIntegrityViolated(reason string) *AppError

DataIntegrityViolated creates an error indicating a data integrity violation.

func DatabaseConnectionFailed

func DatabaseConnectionFailed(err error) *AppError

DatabaseConnectionFailed creates an error indicating database connection failed.

func DatabaseRequired

func DatabaseRequired() *AppError

DatabaseRequired creates an error when database connection is required.

func DatabaseTimeout

func DatabaseTimeout(operation string) *AppError

DatabaseTimeout creates an error indicating a database operation timed out.

func DatabaseTypeUnsupported

func DatabaseTypeUnsupported(dbType string) *AppError

DatabaseTypeUnsupported creates an error for unsupported database types.

func DatabaseUnavailable

func DatabaseUnavailable(err error) *AppError

DatabaseUnavailable creates an error indicating the database service is unavailable.

func DateRangeInvalid

func DateRangeInvalid(reason string) *AppError

DateRangeInvalid creates an error for invalid date ranges.

func DeleteActivityInvalid

func DeleteActivityInvalid(reason string) *AppError

DeleteActivityInvalid creates an error indicating an invalid delete activity.

func DeleteFailed

func DeleteFailed(itemType string, err error) *AppError

DeleteFailed creates an error indicating item deletion failed.

func DeleteObjectNotFound

func DeleteObjectNotFound(objectID string) *AppError

DeleteObjectNotFound creates an error indicating a delete target object was not found.

func DeleteUnauthorized

func DeleteUnauthorized(actorID, objectID string) *AppError

DeleteUnauthorized creates an error indicating unauthorized access to delete an object.

func DeliveryFailed

func DeliveryFailed(recipient string, err error) *AppError

DeliveryFailed creates an error indicating federation delivery failed.

func DeliveryPermanentFailure

func DeliveryPermanentFailure(recipient string, reason string) *AppError

DeliveryPermanentFailure creates an error indicating a permanent delivery failure.

func DeliveryRejected

func DeliveryRejected(recipient string, statusCode int) *AppError

DeliveryRejected creates an error indicating federation delivery was rejected.

func DeliveryTimeout

func DeliveryTimeout(recipient string) *AppError

DeliveryTimeout creates an error indicating federation delivery timed out.

func DeliveryToDomainsFailed

func DeliveryToDomainsFailed(count int, err error) *AppError

DeliveryToDomainsFailed creates an error indicating failed delivery to multiple domains.

func DeliveryToInboxesFailed

func DeliveryToInboxesFailed(count int, err error) *AppError

DeliveryToInboxesFailed creates an error indicating failed delivery to multiple inboxes.

func DependencyInitializationFailed

func DependencyInitializationFailed(dependency string, err error) *AppError

DependencyInitializationFailed creates an error indicating dependency initialization failed.

func DeviceCreationFailed

func DeviceCreationFailed(err error) *AppError

DeviceCreationFailed creates an error indicating device creation failed.

func DeviceIDRetrievalFailed

func DeviceIDRetrievalFailed(err error) *AppError

DeviceIDRetrievalFailed creates an error indicating device ID retrieval failed.

func DeviceNotFound

func DeviceNotFound(deviceID string) *AppError

DeviceNotFound creates an error indicating a device was not found.

func DeviceOwnershipMismatch

func DeviceOwnershipMismatch() *AppError

DeviceOwnershipMismatch creates an error indicating a device does not belong to the user.

func DisplayNameTooLong

func DisplayNameTooLong(maxLength int) *AppError

DisplayNameTooLong creates an error indicating display name is too long.

func DomainHealthScoreRetrievalFailed

func DomainHealthScoreRetrievalFailed(domain string, err error) *AppError

DomainHealthScoreRetrievalFailed creates an error for domain health score retrieval failures.

func DynamoDBConditionalCheckFailed

func DynamoDBConditionalCheckFailed(condition string) *AppError

DynamoDBConditionalCheckFailed creates an error indicating a DynamoDB conditional check failed.

func DynamoDBItemTooLarge

func DynamoDBItemTooLarge() *AppError

DynamoDBItemTooLarge creates an error indicating a DynamoDB item exceeds maximum size.

func DynamoDBProvisionedThroughputExceeded

func DynamoDBProvisionedThroughputExceeded() *AppError

DynamoDBProvisionedThroughputExceeded creates an error indicating DynamoDB capacity was exceeded.

func EmailDomainInvalid

func EmailDomainInvalid() *AppError

EmailDomainInvalid creates an error indicating email domain is invalid.

func EmailEmpty

func EmailEmpty() *AppError

EmailEmpty creates an error indicating email address is required.

func EmailInvalidFormat

func EmailInvalidFormat() *AppError

EmailInvalidFormat creates an error indicating email address format is invalid.

func EmailRequired

func EmailRequired() *AppError

EmailRequired creates an error when email is required but missing.

func EmailTooLong

func EmailTooLong() *AppError

EmailTooLong creates an error indicating email address is too long.

func EnhancedFederationProcessorDynamORMInit

func EnhancedFederationProcessorDynamORMInit() *AppError

EnhancedFederationProcessorDynamORMInit creates an error indicating failure to initialize DynamORM client.

func EnhancedFederationProcessorProcessRetry

func EnhancedFederationProcessorProcessRetry() *AppError

EnhancedFederationProcessorProcessRetry creates an error indicating failure to process enhanced retry operation.

func EnhancedFederationProcessorUnmarshalRetryMessage

func EnhancedFederationProcessorUnmarshalRetryMessage() *AppError

EnhancedFederationProcessorUnmarshalRetryMessage creates an error indicating failure to unmarshal retry message from SQS.

func EntityTypeExtractionFailed

func EntityTypeExtractionFailed(err error) *AppError

EntityTypeExtractionFailed creates an error for entity type extraction failures.

func EnvironmentVariableMissing

func EnvironmentVariableMissing(varName string) *AppError

EnvironmentVariableMissing creates an error indicating a required environment variable is missing.

func EnvironmentVariableRequired

func EnvironmentVariableRequired(varName string) *AppError

EnvironmentVariableRequired creates an error indicating a required environment variable is missing.

func EventInvalid

func EventInvalid(eventType, reason string) *AppError

EventInvalid creates an error indicating an invalid event structure.

func EventMissingField

func EventMissingField(eventType, field string) *AppError

EventMissingField creates an error indicating an event is missing a required field.

func EventParsingFailed

func EventParsingFailed(eventType string, err error) *AppError

EventParsingFailed creates an error indicating failed to parse an event.

func EventProcessingFailed

func EventProcessingFailed(eventType string, err error) *AppError

EventProcessingFailed creates an error indicating event processing failed.

func EventTooLarge

func EventTooLarge(eventType string, size int64) *AppError

EventTooLarge creates an error indicating an event exceeds size limit.

func ExpandMediaSettingInvalid

func ExpandMediaSettingInvalid(setting string) *AppError

ExpandMediaSettingInvalid creates an error for invalid expand media settings.

func ExternalAPIError

func ExternalAPIError(apiName string, statusCode int, err error) *AppError

ExternalAPIError creates an error indicating an external API error occurred.

func ExternalServiceUnavailable

func ExternalServiceUnavailable(serviceName string, err error) *AppError

ExternalServiceUnavailable creates an error indicating an external service is unavailable.

func FailedToCreate

func FailedToCreate(itemType string, err error) *AppError

FailedToCreate creates an error indicating creation of an item failed.

func FailedToDecodePEM

func FailedToDecodePEM() *AppError

FailedToDecodePEM creates an error indicating failed to decode private key PEM.

func FailedToDelete

func FailedToDelete(itemType string, err error) *AppError

FailedToDelete creates an error indicating deletion of an item failed.

func FailedToGet

func FailedToGet(itemType string, err error) *AppError

FailedToGet creates an error indicating retrieval of an item failed.

func FailedToList

func FailedToList(itemType string, err error) *AppError

FailedToList creates an error indicating listing of items failed.

func FailedToQuery

func FailedToQuery(itemType string, err error) *AppError

FailedToQuery creates an error indicating querying of items failed.

func FailedToRemove

func FailedToRemove(itemType string, err error) *AppError

FailedToRemove creates an error indicating removal of an item failed.

func FailedToRetrieve

func FailedToRetrieve(itemType string, err error) *AppError

FailedToRetrieve creates an error indicating retrieval of an item failed.

func FailedToSave

func FailedToSave(itemType string, err error) *AppError

FailedToSave creates an error indicating saving of an item failed.

func FailedToStore

func FailedToStore(itemType string, err error) *AppError

FailedToStore creates an error indicating storing of an item failed.

func FailedToUpdate

func FailedToUpdate(itemType string, err error) *AppError

FailedToUpdate creates an error indicating update of an item failed.

func FederationAggregatorAWSClientsInit

func FederationAggregatorAWSClientsInit() *AppError

FederationAggregatorAWSClientsInit creates an error indicating failed to initialize AWS clients.

func FederationAggregatorActivitiesGet

func FederationAggregatorActivitiesGet() *AppError

FederationAggregatorActivitiesGet creates an error indicating failed to get federation activities.

func FederationAggregatorEventMarshal

func FederationAggregatorEventMarshal() *AppError

FederationAggregatorEventMarshal creates an error indicating failed to marshal aggregation event.

func FederationAggregatorEventUnmarshal

func FederationAggregatorEventUnmarshal() *AppError

FederationAggregatorEventUnmarshal creates an error indicating failed to unmarshal aggregation event.

func FederationAggregatorLambdaFunctionError

func FederationAggregatorLambdaFunctionError() *AppError

FederationAggregatorLambdaFunctionError creates an error indicating lambda function returned error.

func FederationAggregatorLambdaInvocationFailed

func FederationAggregatorLambdaInvocationFailed() *AppError

FederationAggregatorLambdaInvocationFailed creates an error indicating failed to invoke lambda and send SQS message.

func FederationAggregatorMessageProcessingFailed

func FederationAggregatorMessageProcessingFailed() *AppError

FederationAggregatorMessageProcessingFailed creates an error indicating failed to process SQS message.

func FederationAggregatorStore

func FederationAggregatorStore() *AppError

FederationAggregatorStore creates an error indicating failed to store aggregation.

func FederationDeliveryInvalidMessageBody

func FederationDeliveryInvalidMessageBody() *AppError

FederationDeliveryInvalidMessageBody creates an error indicating invalid message body format.

func FederationDeliveryMaxAttemptsExceeded

func FederationDeliveryMaxAttemptsExceeded() *AppError

FederationDeliveryMaxAttemptsExceeded creates an error indicating delivery failed after maximum attempts.

func FederationDeliveryMessageMarshalFailure

func FederationDeliveryMessageMarshalFailure() *AppError

FederationDeliveryMessageMarshalFailure creates an error indicating failed to marshal message for requeue.

func FederationDeliveryMessageRequeueFailure

func FederationDeliveryMessageRequeueFailure() *AppError

FederationDeliveryMessageRequeueFailure creates an error indicating failed to requeue message.

func FederationDeliverySigningActorMissing

func FederationDeliverySigningActorMissing() *AppError

FederationDeliverySigningActorMissing creates an error indicating signing actor not found.

func FederationErrorWithRemoteInfo

func FederationErrorWithRemoteInfo(baseErr *AppError, remoteInstance, remoteActor string) *AppError

FederationErrorWithRemoteInfo adds remote instance and actor information to a federation error.

func FieldTooLong

func FieldTooLong(field string, maxLength int, actualLength int) *AppError

FieldTooLong creates an error indicating a field exceeds maximum length.

func FieldTooShort

func FieldTooShort(field string, minLength int, actualLength int) *AppError

FieldTooShort creates an error indicating a field is below minimum length.

func FileSizeExceeded

func FileSizeExceeded(size, maxSize int64) *AppError

FileSizeExceeded creates an error indicating file size exceeds limit.

func FileSizeExceedsLimit

func FileSizeExceedsLimit(size, limit int64) *AppError

FileSizeExceedsLimit creates an error when file size exceeds the configured limit.

func FileValidationFailed

func FileValidationFailed(reason string) *AppError

FileValidationFailed creates an error for file validation failures.

func FilterActionInvalid

func FilterActionInvalid(action string) *AppError

FilterActionInvalid creates an error indicating invalid filter action.

func FilterContextInvalid

func FilterContextInvalid(context string) *AppError

FilterContextInvalid creates an error indicating invalid filter context.

func FilterKeywordEmpty

func FilterKeywordEmpty() *AppError

FilterKeywordEmpty creates an error indicating filter keyword cannot be empty.

func FilterKeywordTooLong

func FilterKeywordTooLong(maxLength int) *AppError

FilterKeywordTooLong creates an error indicating filter keyword is too long.

func FlaggedObjectsNotFound

func FlaggedObjectsNotFound() *AppError

FlaggedObjectsNotFound creates an error when no flagged objects are found.

func FollowAlreadyExists

func FollowAlreadyExists(follower, followee string) *AppError

FollowAlreadyExists creates an error indicating a follow relationship already exists.

func FollowNotFound

func FollowNotFound(follower, followee string) *AppError

FollowNotFound creates an error indicating a follow relationship was not found.

func FollowRequestInvalid

func FollowRequestInvalid(reason string) *AppError

FollowRequestInvalid creates an error indicating an invalid follow request.

func Forbidden

func Forbidden(message string) *AppError

Forbidden creates a forbidden error

func FormBoundaryMissing

func FormBoundaryMissing() *AppError

FormBoundaryMissing creates an error indicating no boundary found in multipart content type.

func FormFieldInvalid

func FormFieldInvalid(field, reason string) *AppError

FormFieldInvalid creates an error indicating form field is invalid.

func FormFieldMissing

func FormFieldMissing(field string) *AppError

FormFieldMissing creates an error indicating required form field is missing.

func FormatNotSupported

func FormatNotSupported(format string) *AppError

FormatNotSupported creates an error for unsupported file formats.

func GeneratedPrivateKeyStorageFailed

func GeneratedPrivateKeyStorageFailed(err error) *AppError

GeneratedPrivateKeyStorageFailed creates an error indicating generated private key storage failed.

func GetAccountAttemptCountFailed

func GetAccountAttemptCountFailed(err error) *AppError

GetAccountAttemptCountFailed creates an error indicating getting account attempt count failed.

func GetFailed

func GetFailed(itemType string, err error) *AppError

GetFailed creates an error indicating item retrieval failed.

func GetIPAttemptCountFailed

func GetIPAttemptCountFailed(err error) *AppError

GetIPAttemptCountFailed creates an error indicating getting IP attempt count failed.

func HTTPSignatureVerificationFailed

func HTTPSignatureVerificationFailed(reason string) *AppError

HTTPSignatureVerificationFailed creates an error indicating HTTP signature verification failed.

func HealthCheckFailed

func HealthCheckFailed(instance string, err error) *AppError

HealthCheckFailed creates an error indicating a federation health check failed.

func HourlyCostLimitExceeded

func HourlyCostLimitExceeded() *AppError

HourlyCostLimitExceeded creates an error when hourly cost limit would be exceeded.

func IDEmpty

func IDEmpty(idType string) *AppError

IDEmpty creates an error indicating ID cannot be empty.

func IDInvalidFormat

func IDInvalidFormat(idType string) *AppError

IDInvalidFormat creates an error indicating ID format is invalid.

func IDTooLong

func IDTooLong(idType string, maxLength int) *AppError

IDTooLong creates an error indicating ID is too long.

func IPAddressMismatch

func IPAddressMismatch() *AppError

IPAddressMismatch creates an error indicating IP address mismatch.

func IPRateLimitCheckFailed

func IPRateLimitCheckFailed(err error) *AppError

IPRateLimitCheckFailed creates an error indicating IP rate limit check failed.

func IPRateLimitExceeded

func IPRateLimitExceeded(resetTime int64) *AppError

IPRateLimitExceeded creates an error indicating too many requests from an IP address.

func ImageInvalidFormat

func ImageInvalidFormat(format string) *AppError

ImageInvalidFormat creates an error indicating invalid image format.

func ImposeAccountLockoutFailed

func ImposeAccountLockoutFailed(err error) *AppError

ImposeAccountLockoutFailed creates an error indicating imposing account lockout failed.

func ImposeIPLockoutFailed

func ImposeIPLockoutFailed(err error) *AppError

ImposeIPLockoutFailed creates an error indicating imposing IP lockout failed.

func InboxMessageDuplicate

func InboxMessageDuplicate(activityID string) *AppError

InboxMessageDuplicate creates an error indicating a duplicate inbox message.

func InboxMessageInvalid

func InboxMessageInvalid(reason string) *AppError

InboxMessageInvalid creates an error indicating an invalid inbox message.

func InboxProcessingFailed

func InboxProcessingFailed(reason string, err error) *AppError

InboxProcessingFailed creates an error indicating inbox processing failed.

func InboxUnauthorized

func InboxUnauthorized(actorID string) *AppError

InboxUnauthorized creates an error indicating unauthorized inbox access.

func IndexError

func IndexError(indexName string, err error) *AppError

IndexError creates an error indicating a database index error occurred.

func InitDeployFailedToConvertToECDHKey

func InitDeployFailedToConvertToECDHKey() *AppError

InitDeployFailedToConvertToECDHKey creates an error indicating failed to convert to ECDH key.

func InitDeployFailedToCreateOrUpdateSecret

func InitDeployFailedToCreateOrUpdateSecret() *AppError

InitDeployFailedToCreateOrUpdateSecret creates an error indicating failed to create or update secret.

func InitDeployFailedToGeneratePrivateKey

func InitDeployFailedToGeneratePrivateKey() *AppError

InitDeployFailedToGeneratePrivateKey creates an error indicating failed to generate private key.

func InitDeployFailedToMarshalPrivateKey

func InitDeployFailedToMarshalPrivateKey() *AppError

InitDeployFailedToMarshalPrivateKey creates an error indicating failed to marshal private key.

func InstanceNotFound

func InstanceNotFound(domain string) *AppError

InstanceNotFound creates an error indicating a federation instance was not found.

func InstanceSuspended

func InstanceSuspended(domain string) *AppError

InstanceSuspended creates an error indicating a federation instance is suspended.

func InstanceUnreachable

func InstanceUnreachable(domain string, err error) *AppError

InstanceUnreachable creates an error indicating a federation instance is unreachable.

func InsufficientHistoricalData

func InsufficientHistoricalData(required int) *AppError

InsufficientHistoricalData creates an error when insufficient historical data is available.

func InsufficientPermissions

func InsufficientPermissions(operation string) *AppError

InsufficientPermissions creates an error indicating insufficient permissions for an operation.

func InsufficientScope

func InsufficientScope(requiredScope string) *AppError

InsufficientScope creates an error indicating insufficient permissions for the required scope.

func InsufficientTrustees

func InsufficientTrustees() *AppError

InsufficientTrustees creates an error indicating insufficient trustees are configured.

func Internal

func Internal(message string) *AppError

Internal creates an internal server error

func InternalWithCause

func InternalWithCause(err error, message string) *AppError

InternalWithCause creates an internal error wrapping another error

func InvalidActivityObject

func InvalidActivityObject() *AppError

InvalidActivityObject creates an error indicating invalid activity object.

func InvalidCharacters

func InvalidCharacters(field, allowedChars string) *AppError

InvalidCharacters creates an error indicating a field contains invalid characters.

func InvalidCredentials

func InvalidCredentials() *AppError

InvalidCredentials creates an error indicating invalid credentials.

func InvalidFileSize

func InvalidFileSize() *AppError

InvalidFileSize creates an error for invalid file size configuration.

func InvalidFormat

func InvalidFormat(field, expectedFormat string) *AppError

InvalidFormat creates an error indicating a field has an invalid format.

func InvalidInput

func InvalidInput(field, reason string) *AppError

InvalidInput creates an error indicating invalid input data.

func InvalidPlanTier

func InvalidPlanTier() *AppError

InvalidPlanTier creates an error for invalid plan tier.

func InvalidPrivateKeyFormat

func InvalidPrivateKeyFormat() *AppError

InvalidPrivateKeyFormat creates an error indicating invalid private key format.

func InvalidPrivateKeyType

func InvalidPrivateKeyType() *AppError

InvalidPrivateKeyType creates an error for invalid private key types.

func InvalidQualitySetting

func InvalidQualitySetting() *AppError

InvalidQualitySetting creates an error for invalid quality setting.

func InvalidRefreshTokenProvided

func InvalidRefreshTokenProvided() *AppError

InvalidRefreshTokenProvided creates an error indicating invalid refresh token provided.

func InvalidSessionDataType

func InvalidSessionDataType() *AppError

InvalidSessionDataType creates an error indicating invalid session data type.

func InvalidSignatureFormat

func InvalidSignatureFormat() *AppError

InvalidSignatureFormat creates an error indicating invalid signature format.

func InvalidSignatureLength

func InvalidSignatureLength() *AppError

InvalidSignatureLength creates an error indicating invalid signature length.

func InvalidStateForOperation

func InvalidStateForOperation(currentState, operation string) *AppError

InvalidStateForOperation creates an error indicating invalid state for an operation.

func InvalidValue

func InvalidValue(field string, allowedValues []string, actual string) *AppError

InvalidValue creates an error indicating an invalid value that is not in the allowed values list.

func ItemAlreadyExists

func ItemAlreadyExists(itemType string) *AppError

ItemAlreadyExists creates an error indicating an item already exists.

func ItemAlreadyExistsWithID

func ItemAlreadyExistsWithID(itemType, id string) *AppError

ItemAlreadyExistsWithID creates an error indicating an item with the specified ID already exists.

func ItemNotFound

func ItemNotFound(itemType string) *AppError

ItemNotFound creates an error indicating an item was not found.

func ItemNotFoundWithID

func ItemNotFoundWithID(itemType, id string) *AppError

ItemNotFoundWithID creates an error indicating an item with the specified ID was not found.

func JSONArrayTooLarge

func JSONArrayTooLarge(maxElements int) *AppError

JSONArrayTooLarge creates an error indicating JSON array has too many elements.

func JSONBombDetected

func JSONBombDetected(reason string) *AppError

JSONBombDetected creates an error indicating possible JSON bomb detected.

func JSONFormatInvalid

func JSONFormatInvalid(reason string) *AppError

JSONFormatInvalid creates an error for invalid JSON formats.

func JSONInvalid

func JSONInvalid(reason string) *AppError

JSONInvalid creates an error indicating invalid JSON structure.

func JSONKeyTooLong

func JSONKeyTooLong(maxLength int) *AppError

JSONKeyTooLong creates an error indicating JSON key is too long.

func JSONSizeTooLarge

func JSONSizeTooLarge(maxSize int64) *AppError

JSONSizeTooLarge creates an error indicating JSON size exceeds maximum.

func JSONStringTooLong

func JSONStringTooLong(maxLength int) *AppError

JSONStringTooLong creates an error indicating JSON string is too long.

func JSONTooDeep

func JSONTooDeep(maxDepth int) *AppError

JSONTooDeep creates an error indicating JSON nesting too deep.

func JSONTooManyKeys

func JSONTooManyKeys(maxKeys int) *AppError

JSONTooManyKeys creates an error indicating JSON object has too many keys.

func JWTUnexpectedSigningMethod

func JWTUnexpectedSigningMethod() *AppError

JWTUnexpectedSigningMethod creates an error indicating JWT unexpected signing method.

func KeyPairGenerationRotationFailed

func KeyPairGenerationRotationFailed(err error) *AppError

KeyPairGenerationRotationFailed creates an error indicating key pair generation during rotation failed.

func KeyTypeUnsupported

func KeyTypeUnsupported(keyType string) *AppError

KeyTypeUnsupported creates an error for unsupported key types.

func KeypairGenerationFailed

func KeypairGenerationFailed(err error) *AppError

KeypairGenerationFailed creates an error for keypair generation failures.

func LambdaColdStart

func LambdaColdStart(functionName string, duration int64) *AppError

LambdaColdStart creates an error indicating a Lambda cold start was detected.

func LambdaConfigurationError

func LambdaConfigurationError(functionName, setting string) *AppError

LambdaConfigurationError creates an error indicating a Lambda configuration error.

func LambdaInitializationFailed

func LambdaInitializationFailed(functionName string, err error) *AppError

LambdaInitializationFailed creates an error indicating Lambda initialization failed.

func LambdaMemoryExceeded

func LambdaMemoryExceeded(functionName string, memoryUsed int64) *AppError

LambdaMemoryExceeded creates an error indicating a Lambda memory limit was exceeded.

func LambdaTimeout

func LambdaTimeout(functionName string) *AppError

LambdaTimeout creates an error indicating a Lambda function timed out.

func LastAuthMethodDelete

func LastAuthMethodDelete() *AppError

LastAuthMethodDelete creates an error indicating the last authentication method cannot be deleted.

func LikeActivityInvalid

func LikeActivityInvalid(reason string) *AppError

LikeActivityInvalid creates an error indicating an invalid like activity.

func LikeObjectNotFound

func LikeObjectNotFound(objectID string) *AppError

LikeObjectNotFound creates an error indicating a like target object was not found.

func ListFailed

func ListFailed(itemType string, err error) *AppError

ListFailed creates an error indicating item listing failed.

func ListMemberAlreadyExists

func ListMemberAlreadyExists() *AppError

ListMemberAlreadyExists creates an error indicating a list member already exists.

func ListMemberNotFound

func ListMemberNotFound() *AppError

ListMemberNotFound creates an error indicating a list member was not found.

func ListNotFound

func ListNotFound(listID string) *AppError

ListNotFound creates an error indicating a list was not found.

func ListRepliesPolicyInvalid

func ListRepliesPolicyInvalid(policy string) *AppError

ListRepliesPolicyInvalid creates an error indicating invalid list replies policy.

func ListTitleEmpty

func ListTitleEmpty() *AppError

ListTitleEmpty creates an error indicating list title cannot be empty.

func ListTitleTooLong

func ListTitleTooLong(maxLength int) *AppError

ListTitleTooLong creates an error indicating list title is too long.

func LoggerRequired

func LoggerRequired() *AppError

LoggerRequired creates an error when logger instance is required.

func LoginBeginFailed

func LoginBeginFailed(err error) *AppError

LoginBeginFailed creates an error indicating login begin failed.

func MaintenanceRequired

func MaintenanceRequired(reason string) *AppError

MaintenanceRequired creates an error indicating database maintenance is required.

func MarshalingFailed

func MarshalingFailed(dataType string, err error) *AppError

MarshalingFailed creates an error indicating data marshaling failed.

func MaxCredentialsReached

func MaxCredentialsReached() *AppError

MaxCredentialsReached creates an error indicating the maximum number of credentials has been reached.

func MaxDevicesExceeded

func MaxDevicesExceeded() *AppError

MaxDevicesExceeded creates an error indicating the maximum number of devices has been exceeded.

func MediaAttachmentExpired

func MediaAttachmentExpired(mediaID string) *AppError

MediaAttachmentExpired creates an error when media attachment has expired.

func MediaAttachmentNotReady

func MediaAttachmentNotReady(mediaID string) *AppError

MediaAttachmentNotReady creates an error when media attachment is not ready.

func MediaAttachmentValidationFailed

func MediaAttachmentValidationFailed(reason string) *AppError

MediaAttachmentValidationFailed creates an error for media attachment validation failures.

func MediaDescriptionTooLong

func MediaDescriptionTooLong(maxLength int) *AppError

MediaDescriptionTooLong creates an error indicating media description is too long.

func MediaFileTooLarge

func MediaFileTooLarge(fileSize int64, maxSize int64) *AppError

MediaFileTooLarge creates an error indicating media file size exceeds limit.

func MediaInvalidMimeType

func MediaInvalidMimeType(mimeType string, allowedTypes []string) *AppError

MediaInvalidMimeType creates an error indicating invalid media MIME type.

func MediaJobFailed

func MediaJobFailed(jobID string, err error) *AppError

MediaJobFailed creates an error indicating media job processing failed.

func MediaProcessingFailed

func MediaProcessingFailed(mediaType string, err error) *AppError

MediaProcessingFailed creates an error indicating media processing failed.

func MessageMarshalingFailed

func MessageMarshalingFailed(messageType string, err error) *AppError

MessageMarshalingFailed creates an error for message marshaling failures.

func MessageMismatch

func MessageMismatch() *AppError

MessageMismatch creates an error indicating message mismatch.

func MetricUnsupported

func MetricUnsupported(metric string) *AppError

MetricUnsupported creates an error for unsupported metric types.

func MetricsAggregatorAggregation

func MetricsAggregatorAggregation() *AppError

MetricsAggregatorAggregation creates an error indicating failed to aggregate metrics.

func MetricsAggregatorCleanup

func MetricsAggregatorCleanup() *AppError

MetricsAggregatorCleanup creates an error indicating failed to cleanup metrics.

func MetricsAggregatorMissingRequiredFields

func MetricsAggregatorMissingRequiredFields() *AppError

MetricsAggregatorMissingRequiredFields creates an error indicating missing required fields.

func MetricsAggregatorServiceStatsRetrieval

func MetricsAggregatorServiceStatsRetrieval() *AppError

MetricsAggregatorServiceStatsRetrieval creates an error indicating failed to get service stats.

func MetricsAggregatorStreamRecordUnmarshal

func MetricsAggregatorStreamRecordUnmarshal() *AppError

MetricsAggregatorStreamRecordUnmarshal creates an error indicating failed to unmarshal metric from stream record.

func MetricsCollectionFailed

func MetricsCollectionFailed(metric string, err error) *AppError

MetricsCollectionFailed creates an error indicating federation metrics collection failed.

func MetricsProcessingFailed

func MetricsProcessingFailed(metricType string, err error) *AppError

MetricsProcessingFailed creates an error indicating metrics processing failed.

func MigrationFailed

func MigrationFailed(version string, err error) *AppError

MigrationFailed creates an error indicating database migration failed.

func MissingRequestID

func MissingRequestID() *AppError

MissingRequestID creates an error indicating missing request ID.

func ModerationProcessingFailed

func ModerationProcessingFailed(contentType string, err error) *AppError

ModerationProcessingFailed creates an error indicating moderation processing failed.

func ModerationThresholdInvalid

func ModerationThresholdInvalid() *AppError

ModerationThresholdInvalid creates an error for invalid moderation threshold.

func MoveTargetMustBeSpecified

func MoveTargetMustBeSpecified() *AppError

MoveTargetMustBeSpecified creates an error when move activity must specify a target.

func MultipleErrors

func MultipleErrors(errors []error, operation string) *AppError

MultipleErrors creates an error aggregating multiple failures.

func MultipleValidationErrors

func MultipleValidationErrors(errors []string) *AppError

MultipleValidationErrors creates an error indicating multiple validation errors occurred.

func MustAgreeToTerms

func MustAgreeToTerms() *AppError

MustAgreeToTerms creates an error when user must agree to terms of service.

func NetworkError

func NetworkError(operation string, err error) *AppError

NetworkError creates an error indicating a network operation failed.

func NewAppError

func NewAppError(code ErrorCode, category ErrorCategory, message string) *AppError

NewAppError creates a new AppError with the specified code and category

func NewAppErrorf

func NewAppErrorf(code ErrorCode, category ErrorCategory, format string, args ...interface{}) *AppError

NewAppErrorf creates a new AppError with formatted message

func NewAuthError

func NewAuthError(code ErrorCode, message string) *AppError

NewAuthError creates a new authentication error with the specified error code and message.

func NewAuthInternalError

func NewAuthInternalError(code ErrorCode, message string, internal error) *AppError

NewAuthInternalError creates an authentication error with internal details wrapped from an underlying error.

func NewFederationError

func NewFederationError(code ErrorCode, message string) *AppError

NewFederationError creates a new federation error with the specified error code and message.

func NewFederationInternalError

func NewFederationInternalError(code ErrorCode, message string, internal error) *AppError

NewFederationInternalError creates a federation error with internal details wrapped from an underlying error.

func NewLambdaError

func NewLambdaError(code ErrorCode, message string) *AppError

NewLambdaError creates a new Lambda error with the specified error code and message.

func NewLambdaInternalError

func NewLambdaInternalError(code ErrorCode, message string, internal error) *AppError

NewLambdaInternalError creates a Lambda error with internal details wrapped from an underlying error.

func NewRefreshTokenGenerationFailed

func NewRefreshTokenGenerationFailed(err error) *AppError

NewRefreshTokenGenerationFailed creates an error indicating new refresh token generation failed.

func NewStorageError

func NewStorageError(code ErrorCode, message string) *AppError

NewStorageError creates a new storage error with the specified error code and message.

func NewStorageInternalError

func NewStorageInternalError(code ErrorCode, message string, internal error) *AppError

NewStorageInternalError creates a storage error with internal details wrapped from an underlying error.

func NewValidationError

func NewValidationError(field, message string) *AppError

NewValidationError creates a new validation error for the specified field and message.

func NewValidationErrorWithCode

func NewValidationErrorWithCode(code ErrorCode, field, message string) *AppError

NewValidationErrorWithCode creates a validation error with a specific error code for the specified field.

func NilPattern

func NilPattern() *AppError

NilPattern creates an error for nil pattern.

func NilPatternCache

func NilPatternCache() *AppError

NilPatternCache creates an error for nil pattern cache.

func NilPatternMetric

func NilPatternMetric() *AppError

NilPatternMetric creates an error for nil pattern metric.

func NilPatternTestResult

func NilPatternTestResult() *AppError

NilPatternTestResult creates an error for nil pattern test result.

func NoDatabaseAvailable

func NoDatabaseAvailable() *AppError

NoDatabaseAvailable creates an error when no database is available.

func NoPreviousStateForRestoration

func NoPreviousStateForRestoration(objectID string) *AppError

NoPreviousStateForRestoration creates an error when no previous state is available for restoration.

func NoSharedInboxFound

func NoSharedInboxFound(domain string) *AppError

NoSharedInboxFound creates an error indicating no shared inbox was found for a domain.

func NodeInfoFailed

func NodeInfoFailed(domain string, err error) *AppError

NodeInfoFailed creates an error indicating NodeInfo fetch failed.

func NonceGenerationFailed

func NonceGenerationFailed(err error) *AppError

NonceGenerationFailed creates an error indicating nonce generation failed.

func NotFound

func NotFound(resource string) *AppError

NotFound creates a not found error

func NotFoundWithID

func NotFoundWithID(resource, id string) *AppError

NotFoundWithID creates a not found error with specific ID

func NotRecoveryConfirmationActivity

func NotRecoveryConfirmationActivity() *AppError

NotRecoveryConfirmationActivity creates an error indicating not a recovery confirmation activity.

func NoteProcessorDetectSentiment

func NoteProcessorDetectSentiment() *AppError

NoteProcessorDetectSentiment creates an error indicating failed to detect sentiment.

func NoteProcessorGetNote

func NoteProcessorGetNote() *AppError

NoteProcessorGetNote creates an error indicating failed to get note.

func NoteProcessorGetVotes

func NoteProcessorGetVotes() *AppError

NoteProcessorGetVotes creates an error indicating failed to get votes.

func NoteProcessorPartialBatchFailure

func NoteProcessorPartialBatchFailure() *AppError

NoteProcessorPartialBatchFailure creates an error indicating partial batch failure processing stream records.

func NoteProcessorUpdateNoteAnalysis

func NoteProcessorUpdateNoteAnalysis() *AppError

NoteProcessorUpdateNoteAnalysis creates an error indicating failed to update note analysis.

func NoteProcessorUpdateNoteScore

func NoteProcessorUpdateNoteScore() *AppError

NoteProcessorUpdateNoteScore creates an error indicating failed to update note score.

func NotificationProcessingFailed

func NotificationProcessingFailed(notificationType string, err error) *AppError

NotificationProcessingFailed creates an error indicating notification processing failed.

func NotificationTypeInvalid

func NotificationTypeInvalid(notificationType string) *AppError

NotificationTypeInvalid creates an error indicating invalid notification type.

func OAuthClientNameEmpty

func OAuthClientNameEmpty() *AppError

OAuthClientNameEmpty creates an error indicating OAuth client name is required.

func OAuthGrantTypeInvalid

func OAuthGrantTypeInvalid(grantType string) *AppError

OAuthGrantTypeInvalid creates an error indicating invalid OAuth grant type.

func OAuthInvalidClient

func OAuthInvalidClient() *AppError

OAuthInvalidClient creates an error indicating an invalid OAuth client.

func OAuthInvalidGrant

func OAuthInvalidGrant() *AppError

OAuthInvalidGrant creates an error indicating an invalid OAuth grant.

func OAuthInvalidScope

func OAuthInvalidScope(scope string) *AppError

OAuthInvalidScope creates an error indicating an invalid OAuth scope.

func OAuthRedirectURIInvalid

func OAuthRedirectURIInvalid(uri string) *AppError

OAuthRedirectURIInvalid creates an error indicating invalid OAuth redirect URI.

func OAuthResponseTypeInvalid

func OAuthResponseTypeInvalid(responseType string) *AppError

OAuthResponseTypeInvalid creates an error indicating invalid OAuth response type.

func OAuthScopeInvalid

func OAuthScopeInvalid(scope string) *AppError

OAuthScopeInvalid creates an error indicating invalid OAuth scope.

func OAuthUnsupportedGrantType

func OAuthUnsupportedGrantType(grantType string) *AppError

OAuthUnsupportedGrantType creates an error indicating an unsupported OAuth grant type.

func ObjectHistoryNotFound

func ObjectHistoryNotFound(objectID string) *AppError

ObjectHistoryNotFound creates an error when object history is not available.

func ObjectIDExtractionFailed

func ObjectIDExtractionFailed(context string, err error) *AppError

ObjectIDExtractionFailed creates an error for object ID extraction failures.

func ObjectInvalidField

func ObjectInvalidField(field, reason string) *AppError

ObjectInvalidField creates an error indicating an ActivityPub object has an invalid field.

func ObjectMarshalingFailed

func ObjectMarshalingFailed(objectType string, err error) *AppError

ObjectMarshalingFailed creates an error indicating object marshaling failed.

func ObjectMissingField

func ObjectMissingField(field string) *AppError

ObjectMissingField creates an error indicating an ActivityPub object is missing a required field.

func ObjectNotDeleted

func ObjectNotDeleted(objectID string) *AppError

ObjectNotDeleted creates an error when an object is not deleted as expected.

func ObjectNotFound

func ObjectNotFound(objectID string) *AppError

ObjectNotFound creates an error indicating an object was not found.

func ObjectParsingFailed

func ObjectParsingFailed(objectType string, err error) *AppError

ObjectParsingFailed creates an error indicating ActivityPub object parsing failed.

func ObjectTypeUnsupported

func ObjectTypeUnsupported(objectType string) *AppError

ObjectTypeUnsupported creates an error for unsupported object types.

func ObjectUnmarshalingFailed

func ObjectUnmarshalingFailed(objectType string, err error) *AppError

ObjectUnmarshalingFailed creates an error indicating object unmarshaling failed.

func ObjectValidationFailed

func ObjectValidationFailed(objectType string, reason string) *AppError

ObjectValidationFailed creates an error indicating object validation failed.

func ObjectsNotFoundInActivity

func ObjectsNotFoundInActivity() *AppError

ObjectsNotFoundInActivity creates an error when no objects are found in an activity.

func OldestSessionRemovalFailed

func OldestSessionRemovalFailed(err error) *AppError

OldestSessionRemovalFailed creates an error indicating oldest session removal failed.

func OperationNotAllowed

func OperationNotAllowed(operation string) *AppError

OperationNotAllowed creates an error indicating the specified operation is not allowed.

func OperationNotAllowedOnSelf

func OperationNotAllowedOnSelf(operation string) *AppError

OperationNotAllowedOnSelf creates an error indicating operation cannot be performed on self.

func OriginalActivityFetchFailed

func OriginalActivityFetchFailed(err error) *AppError

OriginalActivityFetchFailed creates an error for fetching original activity failures.

func OutboxActivityInvalid

func OutboxActivityInvalid(reason string) *AppError

OutboxActivityInvalid creates an error indicating an invalid outbox activity.

func OutboxProcessingFailed

func OutboxProcessingFailed(reason string, err error) *AppError

OutboxProcessingFailed creates an error indicating outbox processing failed.

func OutboxUnauthorized

func OutboxUnauthorized(actorID string) *AppError

OutboxUnauthorized creates an error indicating unauthorized outbox access.

func PEMBlockDecodeFailed

func PEMBlockDecodeFailed() *AppError

PEMBlockDecodeFailed creates an error indicating PEM block decoding failed.

func ParsingFailed

func ParsingFailed(parseType string, err error) *AppError

ParsingFailed creates an error indicating parsing failed.

func PasswordContainsUsername

func PasswordContainsUsername() *AppError

PasswordContainsUsername creates an error indicating a password contains the username.

func PasswordHashingFailed

func PasswordHashingFailed(err error) *AppError

PasswordHashingFailed creates an error indicating password processing failed.

func PasswordInsufficientLength

func PasswordInsufficientLength() *AppError

PasswordInsufficientLength creates an error indicating password does not meet minimum length requirement.

func PasswordMissingRequirement

func PasswordMissingRequirement(requirement string) *AppError

PasswordMissingRequirement creates an error indicating a password does not meet requirements.

func PasswordRepeatedPattern

func PasswordRepeatedPattern() *AppError

PasswordRepeatedPattern creates an error indicating password contains too many repeated characters.

func PasswordSequentialPattern

func PasswordSequentialPattern() *AppError

PasswordSequentialPattern creates an error indicating password contains sequential characters.

func PasswordTooCommon

func PasswordTooCommon() *AppError

PasswordTooCommon creates an error indicating a password is too common.

func PasswordTooLong

func PasswordTooLong(maxLength int) *AppError

PasswordTooLong creates an error indicating a password is too long.

func PasswordTooShort

func PasswordTooShort(minLength int) *AppError

PasswordTooShort creates an error indicating a password is too short.

func PasswordUpdateFailed

func PasswordUpdateFailed(err error) *AppError

PasswordUpdateFailed creates an error indicating password update failed.

func PatternAnalysisFailed

func PatternAnalysisFailed(err error) *AppError

PatternAnalysisFailed creates an error for pattern analysis failure.

func PatternCacheCreateFailed

func PatternCacheCreateFailed(err error) *AppError

PatternCacheCreateFailed creates an error for pattern cache creation failure.

func PatternCacheNotFound

func PatternCacheNotFound() *AppError

PatternCacheNotFound creates an error indicating a pattern cache was not found.

func PatternCacheUpdateFailed

func PatternCacheUpdateFailed(err error) *AppError

PatternCacheUpdateFailed creates an error for pattern cache update failure.

func PatternCreateFailed

func PatternCreateFailed(err error) *AppError

PatternCreateFailed creates an error for pattern creation failure.

func PatternDeleteFailed

func PatternDeleteFailed(err error) *AppError

PatternDeleteFailed creates an error for pattern deletion failure.

func PatternMetricsCreateFailed

func PatternMetricsCreateFailed(err error) *AppError

PatternMetricsCreateFailed creates an error for pattern metrics creation failure.

func PatternMetricsQueryFailed

func PatternMetricsQueryFailed(err error) *AppError

PatternMetricsQueryFailed creates an error for pattern metrics query failure.

func PatternMetricsUpdateFailed

func PatternMetricsUpdateFailed(err error) *AppError

PatternMetricsUpdateFailed creates an error for pattern metrics update failure.

func PatternNotFound

func PatternNotFound() *AppError

PatternNotFound creates an error indicating a moderation pattern was not found.

func PatternQueryFailed

func PatternQueryFailed(err error) *AppError

PatternQueryFailed creates an error for pattern query failure.

func PatternSaveFailed

func PatternSaveFailed(err error) *AppError

PatternSaveFailed creates an error for pattern save failure.

func PatternTestResultCreateFailed

func PatternTestResultCreateFailed(err error) *AppError

PatternTestResultCreateFailed creates an error for pattern test result creation failure.

func PatternTestResultNotFound

func PatternTestResultNotFound() *AppError

PatternTestResultNotFound creates an error for pattern test result not found.

func PatternTestResultQueryFailed

func PatternTestResultQueryFailed(err error) *AppError

PatternTestResultQueryFailed creates an error for pattern test result query failure.

func PatternUpdateFailed

func PatternUpdateFailed(err error) *AppError

PatternUpdateFailed creates an error for pattern update failure.

func PatternValidationFailed

func PatternValidationFailed(reason string) *AppError

PatternValidationFailed creates an error for pattern validation failure.

func PlanUpgradeFailed

func PlanUpgradeFailed(err error) *AppError

PlanUpgradeFailed creates an error for plan upgrade failure.

func PollExpiryInvalid

func PollExpiryInvalid() *AppError

PollExpiryInvalid creates an error indicating poll expiry time is invalid.

func PollExpiryTooLong

func PollExpiryTooLong(maxSeconds int) *AppError

PollExpiryTooLong creates an error indicating poll expiry time is too long.

func PollExpiryTooShort

func PollExpiryTooShort(minSeconds int) *AppError

PollExpiryTooShort creates an error indicating poll expiry time is too short.

func PollMultipleChoiceInvalid

func PollMultipleChoiceInvalid() *AppError

PollMultipleChoiceInvalid creates an error indicating invalid multiple choice setting.

func PollOptionEmpty

func PollOptionEmpty() *AppError

PollOptionEmpty creates an error indicating poll option cannot be empty.

func PollOptionTooLong

func PollOptionTooLong(maxLength int) *AppError

PollOptionTooLong creates an error indicating poll option is too long.

func PollTooFewOptions

func PollTooFewOptions(minOptions int) *AppError

PollTooFewOptions creates an error indicating poll has too few options.

func PollTooManyOptions

func PollTooManyOptions(maxOptions int, actualCount int) *AppError

PollTooManyOptions creates an error indicating poll has too many options.

func PostConditionFailed

func PostConditionFailed(condition string) *AppError

PostConditionFailed creates an error indicating a post-condition was not met.

func PreConditionFailed

func PreConditionFailed(condition string) *AppError

PreConditionFailed creates an error indicating a pre-condition was not met.

func PreviousStateNotAvailable

func PreviousStateNotAvailable(objectID string) *AppError

PreviousStateNotAvailable creates an error when previous state is not available.

func PrivateKeyMarshalFailed

func PrivateKeyMarshalFailed(err error) *AppError

PrivateKeyMarshalFailed creates an error indicating private key marshalling failed.

func PrivateKeyParseFailed

func PrivateKeyParseFailed(err error) *AppError

PrivateKeyParseFailed creates an error indicating private key parsing failed.

func PrivateKeyRetrievalFailed

func PrivateKeyRetrievalFailed(err error) *AppError

PrivateKeyRetrievalFailed creates an error indicating private key retrieval failed.

func ProcessingFailed

func ProcessingFailed(processType string, err error) *AppError

ProcessingFailed creates an error indicating processing failed.

func PublicKeyEncodingFailed

func PublicKeyEncodingFailed(err error) *AppError

PublicKeyEncodingFailed creates an error for public key encoding failures.

func PublicKeyMarshalFailed

func PublicKeyMarshalFailed(err error) *AppError

PublicKeyMarshalFailed creates an error indicating public key marshalling failed.

func PublicKeyRecoveryFailed

func PublicKeyRecoveryFailed(err error) *AppError

PublicKeyRecoveryFailed creates an error indicating public key recovery failed.

func PushDeliveryFailed

func PushDeliveryFailed(deviceID string, err error) *AppError

PushDeliveryFailed creates an error indicating push notification delivery failed.

func QueryByFieldFailed

func QueryByFieldFailed(itemType, field string, err error) *AppError

QueryByFieldFailed creates an error indicating querying by field failed.

func QueryFailed

func QueryFailed(query string, err error) *AppError

QueryFailed creates an error indicating a database query failed.

func QueryInvalid

func QueryInvalid(query string, reason string) *AppError

QueryInvalid creates an error indicating a database query is invalid.

func QueueURLNotConfigured

func QueueURLNotConfigured(queueName string) *AppError

QueueURLNotConfigured creates an error when queue URL is not configured.

func QuotaExceeded

func QuotaExceeded(quotaType string, limit int64) *AppError

QuotaExceeded creates an error indicating quota was exceeded.

func RSAKeyPairGenerationFailed

func RSAKeyPairGenerationFailed(err error) *AppError

RSAKeyPairGenerationFailed creates an error indicating RSA key pair generation failed.

func RateLimitExceeded

func RateLimitExceeded(limitType string, resetTime int64) *AppError

RateLimitExceeded creates an error indicating a rate limit has been exceeded.

func RateLimitExceededGeneric

func RateLimitExceededGeneric(limitType string) *AppError

RateLimitExceededGeneric creates an error indicating rate limit was exceeded.

func RecordAccountAttemptFailed

func RecordAccountAttemptFailed(err error) *AppError

RecordAccountAttemptFailed creates an error indicating recording account attempt failed.

func RecordIPAttemptFailed

func RecordIPAttemptFailed(err error) *AppError

RecordIPAttemptFailed creates an error indicating recording IP attempt failed.

func RecoveryCodeClearFailed

func RecoveryCodeClearFailed(err error) *AppError

RecoveryCodeClearFailed creates an error indicating recovery code clearing failed.

func RecoveryCodeGenerationFailed

func RecoveryCodeGenerationFailed(err error) *AppError

RecoveryCodeGenerationFailed creates an error indicating recovery code generation failed.

func RecoveryCodeHashingFailed

func RecoveryCodeHashingFailed(err error) *AppError

RecoveryCodeHashingFailed creates an error indicating recovery code hashing failed.

func RecoveryCodeInvalid

func RecoveryCodeInvalid() *AppError

RecoveryCodeInvalid creates an error indicating a recovery code is invalid.

func RecoveryCodeMarkUsedFailed

func RecoveryCodeMarkUsedFailed(err error) *AppError

RecoveryCodeMarkUsedFailed creates an error indicating marking recovery code as used failed.

func RecoveryCodeRetrievalFailed

func RecoveryCodeRetrievalFailed(err error) *AppError

RecoveryCodeRetrievalFailed creates an error indicating recovery code retrieval failed.

func RecoveryCodeStorageFailed

func RecoveryCodeStorageFailed(err error) *AppError

RecoveryCodeStorageFailed creates an error indicating recovery code storage failed.

func RecoveryCodeUsed

func RecoveryCodeUsed() *AppError

RecoveryCodeUsed creates an error indicating a recovery code has already been used.

func RecoveryConfirmationFailed

func RecoveryConfirmationFailed(err error) *AppError

RecoveryConfirmationFailed creates an error indicating recovery confirmation processing failed.

func RecoveryRequestExpired

func RecoveryRequestExpired() *AppError

RecoveryRequestExpired creates an error indicating a recovery request has expired.

func RecoveryRequestNotFound

func RecoveryRequestNotFound() *AppError

RecoveryRequestNotFound creates an error indicating a recovery request was not found.

func RecoveryRequestNotPending

func RecoveryRequestNotPending() *AppError

RecoveryRequestNotPending creates an error indicating recovery request is not pending.

func RecoveryRequestRetrievalFailed

func RecoveryRequestRetrievalFailed(err error) *AppError

RecoveryRequestRetrievalFailed creates an error indicating recovery request retrieval failed.

func RecoveryRequestStorageFailed

func RecoveryRequestStorageFailed(err error) *AppError

RecoveryRequestStorageFailed creates an error indicating recovery request storage failed.

func RecoveryRequestUpdateFailed

func RecoveryRequestUpdateFailed(err error) *AppError

RecoveryRequestUpdateFailed creates an error indicating recovery request update failed.

func RecoveryTokenGenerationFailed

func RecoveryTokenGenerationFailed(err error) *AppError

RecoveryTokenGenerationFailed creates an error indicating recovery token generation failed.

func RecoveryTokenStorageFailed

func RecoveryTokenStorageFailed(err error) *AppError

RecoveryTokenStorageFailed creates an error indicating recovery token storage failed.

func RefreshTokenExpired

func RefreshTokenExpired() *AppError

RefreshTokenExpired creates an error indicating a refresh token has expired.

func RefreshTokenGenerationFailed

func RefreshTokenGenerationFailed(err error) *AppError

RefreshTokenGenerationFailed creates an error indicating refresh token generation failed.

func RefreshTokenInvalid

func RefreshTokenInvalid() *AppError

RefreshTokenInvalid creates an error indicating a refresh token is invalid.

func RefreshTokenNotFound

func RefreshTokenNotFound() *AppError

RefreshTokenNotFound creates an error indicating a refresh token was not found.

func RefreshTokenRotationFailed

func RefreshTokenRotationFailed(err error) *AppError

RefreshTokenRotationFailed creates an error indicating refresh token rotation failed.

func RegistrationBeginFailed

func RegistrationBeginFailed(err error) *AppError

RegistrationBeginFailed creates an error indicating registration begin failed.

func RegistryOptionApplyFailed

func RegistryOptionApplyFailed(err error) *AppError

RegistryOptionApplyFailed creates an error for registry option application failures.

func RegistryValidationFailed

func RegistryValidationFailed(reason string) *AppError

RegistryValidationFailed creates an error for registry validation failures.

func RelationshipAlreadyExists

func RelationshipAlreadyExists() *AppError

RelationshipAlreadyExists creates an error indicating a relationship already exists.

func RelationshipNotFound

func RelationshipNotFound() *AppError

RelationshipNotFound creates an error indicating a relationship was not found.

func RemoteFetchFailed

func RemoteFetchFailed(url string, err error) *AppError

RemoteFetchFailed creates an error indicating failed to fetch a remote resource.

func RemoteFetchNotFound

func RemoteFetchNotFound(url string) *AppError

RemoteFetchNotFound creates an error indicating a remote resource was not found.

func RemoteFetchRateLimited

func RemoteFetchRateLimited(url string) *AppError

RemoteFetchRateLimited creates an error indicating remote fetch was rate limited.

func RemoteFetchTimeout

func RemoteFetchTimeout(url string) *AppError

RemoteFetchTimeout creates an error indicating remote fetch timed out.

func RemoteFetchUnauthorized

func RemoteFetchUnauthorized(url string) *AppError

RemoteFetchUnauthorized creates an error indicating remote fetch was unauthorized.

func ReportTrustUpdaterMissingKeys

func ReportTrustUpdaterMissingKeys() *AppError

ReportTrustUpdaterMissingKeys creates an error indicating missing keys.

func ReportTrustUpdaterReportRetrieval

func ReportTrustUpdaterReportRetrieval() *AppError

ReportTrustUpdaterReportRetrieval creates an error indicating failed to get report.

func RepositoryNotAvailable

func RepositoryNotAvailable(repositoryType string) *AppError

RepositoryNotAvailable creates an error when a repository is not available.

func RequiredFieldMissing

func RequiredFieldMissing(field string) *AppError

RequiredFieldMissing creates an error indicating a required field is missing or empty.

func ResourceAccessDenied

func ResourceAccessDenied(resource string) *AppError

ResourceAccessDenied creates an error indicating Lambda resource access was denied.

func ResourceLocked

func ResourceLocked(resourceType, resourceID string) *AppError

ResourceLocked creates an error indicating a resource is locked.

func ResourceUnavailable

func ResourceUnavailable(resourceType string) *AppError

ResourceUnavailable creates an error indicating a resource is temporarily unavailable.

func RetrievedPrivateKeyInvalid

func RetrievedPrivateKeyInvalid() *AppError

RetrievedPrivateKeyInvalid creates an error indicating retrieved private key is invalid.

func RoutingFailed

func RoutingFailed(destination string, err error) *AppError

RoutingFailed creates an error indicating federation routing failed.

func SIEMRequestCreationFailed

func SIEMRequestCreationFailed(err error) *AppError

SIEMRequestCreationFailed creates an error indicating SIEM request creation failed.

func SIEMResponseError

func SIEMResponseError() *AppError

SIEMResponseError creates an error indicating SIEM returned error status.

func SIEMTransmissionFailed

func SIEMTransmissionFailed(err error) *AppError

SIEMTransmissionFailed creates an error indicating SIEM transmission failed.

func SNSPublishFailed

func SNSPublishFailed(err error) *AppError

SNSPublishFailed creates an error when publishing to SNS fails.

func SQSBatchProcessingFailed

func SQSBatchProcessingFailed(batchSize int, successCount int, err error) *AppError

SQSBatchProcessingFailed creates an error indicating SQS batch processing failed.

func SQSConnectionFailed

func SQSConnectionFailed(err error) *AppError

SQSConnectionFailed creates an error for SQS connection failures.

func SQSMessageInvalid

func SQSMessageInvalid(messageID string, reason string) *AppError

SQSMessageInvalid creates an error indicating an invalid SQS message.

func SQSMessageProcessingFailed

func SQSMessageProcessingFailed(messageID string, err error) *AppError

SQSMessageProcessingFailed creates an error indicating SQS message processing failed.

func SQSMessageSendFailed

func SQSMessageSendFailed(err error) *AppError

SQSMessageSendFailed creates an error for SQS message send failures.

func SQSMessageTooLarge

func SQSMessageTooLarge(messageSize int64) *AppError

SQSMessageTooLarge creates an error indicating an SQS message exceeds size limit.

func SQSRetryExhausted

func SQSRetryExhausted(messageID string, attempts int) *AppError

SQSRetryExhausted creates an error indicating SQS message retry attempts were exhausted.

func SQSVisibilityTimeoutExceeded

func SQSVisibilityTimeoutExceeded(messageID string) *AppError

SQSVisibilityTimeoutExceeded creates an error indicating SQS message visibility timeout was exceeded.

func ScheduledTimeValidationFailed

func ScheduledTimeValidationFailed(reason string) *AppError

ScheduledTimeValidationFailed creates an error for invalid scheduled times.

func SearchIndexerCreateActorSearchIndex

func SearchIndexerCreateActorSearchIndex() *AppError

SearchIndexerCreateActorSearchIndex creates an error indicating failed to create actor search index.

func SearchIndexerCreateSearchIndex

func SearchIndexerCreateSearchIndex() *AppError

SearchIndexerCreateSearchIndex creates an error indicating failed to create search index.

func SearchIndexerExtractIndexableContent

func SearchIndexerExtractIndexableContent() *AppError

SearchIndexerExtractIndexableContent creates an error indicating failed to extract indexable content.

func SearchIndexerPartialBatchFailure

func SearchIndexerPartialBatchFailure() *AppError

SearchIndexerPartialBatchFailure creates an error indicating partial batch failure during search indexing.

func SearchIndexerStoreSearchIndex

func SearchIndexerStoreSearchIndex() *AppError

SearchIndexerStoreSearchIndex creates an error indicating failed to store search index.

func SearchIndexerUnmarshalStreamImage

func SearchIndexerUnmarshalStreamImage() *AppError

SearchIndexerUnmarshalStreamImage creates an error indicating failed to unmarshal stream image.

func SearchIndexingFailed

func SearchIndexingFailed(indexType string, err error) *AppError

SearchIndexingFailed creates an error indicating search indexing failed.

func SecretCreationFailed

func SecretCreationFailed(err error) *AppError

SecretCreationFailed creates an error indicating secret creation failed.

func SecretDeletionFailed

func SecretDeletionFailed(err error) *AppError

SecretDeletionFailed creates an error indicating secret deletion failed.

func SecretRetrievalRetriesFailed

func SecretRetrievalRetriesFailed(err error) *AppError

SecretRetrievalRetriesFailed creates an error indicating secret retrieval failed after retries.

func SecretValueMarshalFailed

func SecretValueMarshalFailed(err error) *AppError

SecretValueMarshalFailed creates an error indicating secret value marshalling failed.

func SecretValueNil

func SecretValueNil() *AppError

SecretValueNil creates an error indicating secret value is nil.

func SecretValueUnmarshalFailed

func SecretValueUnmarshalFailed(err error) *AppError

SecretValueUnmarshalFailed creates an error indicating secret value unmarshalling failed.

func SecretsManagerConnectionFailed

func SecretsManagerConnectionFailed(err error) *AppError

SecretsManagerConnectionFailed creates an error indicating Secrets Manager connection failed.

func SecretsManagerError

func SecretsManagerError(err error) *AppError

SecretsManagerError creates an error indicating a secrets manager error occurred.

func SecretsManagerNotAvailable

func SecretsManagerNotAvailable() *AppError

SecretsManagerNotAvailable creates an error indicating secrets manager is not available.

func SecurityViolation

func SecurityViolation(violationType string) *AppError

SecurityViolation creates an error indicating a security violation was detected.

func ServiceInitializationFailed

func ServiceInitializationFailed(serviceName string, err error) *AppError

ServiceInitializationFailed creates an error indicating service initialization failed.

func ServiceInitializationFailedGeneric

func ServiceInitializationFailedGeneric(service string, err error) *AppError

ServiceInitializationFailedGeneric creates an error indicating service initialization failed.

func ServiceNotAvailable

func ServiceNotAvailable(serviceName string) *AppError

ServiceNotAvailable creates an error when a service is not available.

func ServiceUnavailable

func ServiceUnavailable(serviceName string) *AppError

ServiceUnavailable creates an error indicating a service is temporarily unavailable.

func SessionCannotBeExtended

func SessionCannotBeExtended(reason string) *AppError

SessionCannotBeExtended creates an error indicating a session cannot be extended.

func SessionCreationFailed

func SessionCreationFailed(err error) *AppError

SessionCreationFailed creates an error indicating session creation failed.

func SessionDataDeserializationFailed

func SessionDataDeserializationFailed(err error) *AppError

SessionDataDeserializationFailed creates an error indicating session data deserialization failed.

func SessionDataSerializationFailed

func SessionDataSerializationFailed(err error) *AppError

SessionDataSerializationFailed creates an error indicating session data serialization failed.

func SessionExpired

func SessionExpired() *AppError

SessionExpired creates an error indicating a user session has expired.

func SessionExtensionDisabled

func SessionExtensionDisabled() *AppError

SessionExtensionDisabled creates an error indicating session extension is disabled.

func SessionIDGenerationFailed

func SessionIDGenerationFailed(err error) *AppError

SessionIDGenerationFailed creates an error indicating session ID generation failed.

func SessionIDMismatch

func SessionIDMismatch() *AppError

SessionIDMismatch creates an error indicating session ID mismatch.

func SessionMaxLifetimeReached

func SessionMaxLifetimeReached() *AppError

SessionMaxLifetimeReached creates an error indicating session max lifetime reached.

func SessionNotFound

func SessionNotFound(sessionID string) *AppError

SessionNotFound creates an error indicating the specified session was not found.

func SessionSecurityCheckFailed

func SessionSecurityCheckFailed(err error) *AppError

SessionSecurityCheckFailed creates an error indicating session security check failed.

func SessionSecurityValidationFailed

func SessionSecurityValidationFailed(reason string) *AppError

SessionSecurityValidationFailed creates an error indicating session security validation failed.

func SessionStorageFailed

func SessionStorageFailed(err error) *AppError

SessionStorageFailed creates an error indicating session storage failed.

func SessionUpdateFailed

func SessionUpdateFailed(err error) *AppError

SessionUpdateFailed creates an error indicating session update failed.

func SignatureAddressMismatch

func SignatureAddressMismatch() *AppError

SignatureAddressMismatch creates an error indicating signature address mismatch.

func SignatureExpired

func SignatureExpired() *AppError

SignatureExpired creates an error indicating an HTTP signature has expired.

func SignatureInvalid

func SignatureInvalid(reason string) *AppError

SignatureInvalid creates an error indicating an invalid HTTP signature.

func SignatureMissing

func SignatureMissing() *AppError

SignatureMissing creates an error indicating an HTTP signature is missing.

func SignatureVerificationFailed

func SignatureVerificationFailed() *AppError

SignatureVerificationFailed creates an error indicating signature verification failed.

func SigningActorRetrievalFailed

func SigningActorRetrievalFailed(err error) *AppError

SigningActorRetrievalFailed creates an error indicating signing actor retrieval failed.

func SigningKeyInvalid

func SigningKeyInvalid(keyID string) *AppError

SigningKeyInvalid creates an error indicating an invalid signing key.

func SigningKeyNotFound

func SigningKeyNotFound(keyID string) *AppError

SigningKeyNotFound creates an error indicating a signing key was not found.

func StatusIndexerCountReplies

func StatusIndexerCountReplies() *AppError

StatusIndexerCountReplies creates an error indicating failed to count replies.

func StatusIndexerNoNewImage

func StatusIndexerNoNewImage() *AppError

StatusIndexerNoNewImage creates an error indicating no new image.

func StatusIndexerNoObjectData

func StatusIndexerNoObjectData() *AppError

StatusIndexerNoObjectData creates an error indicating no object data.

func StatusIndexerPartialBatchFailure

func StatusIndexerPartialBatchFailure() *AppError

StatusIndexerPartialBatchFailure creates an error indicating partial batch failure.

func StatusIndexerProcessStatusEvent

func StatusIndexerProcessStatusEvent() *AppError

StatusIndexerProcessStatusEvent creates an error indicating failed to process status event.

func StatusIndexingFailed

func StatusIndexingFailed(statusID string, err error) *AppError

StatusIndexingFailed creates an error indicating status indexing failed.

func StatusInvalidVisibility

func StatusInvalidVisibility(visibility string) *AppError

StatusInvalidVisibility creates an error indicating invalid visibility setting.

func StatusLanguageInvalid

func StatusLanguageInvalid(language string) *AppError

StatusLanguageInvalid creates an error indicating invalid language code.

func StatusNotFound

func StatusNotFound(statusID string) *AppError

StatusNotFound creates an error indicating a status was not found.

func StatusSpoilerTextTooLong

func StatusSpoilerTextTooLong(maxLength int) *AppError

StatusSpoilerTextTooLong creates an error indicating spoiler text is too long.

func StatusTooManyMedia

func StatusTooManyMedia(maxCount int, actualCount int) *AppError

StatusTooManyMedia creates an error indicating too many media attachments.

func StorageActorNotFound

func StorageActorNotFound(username string) *AppError

StorageActorNotFound creates an error indicating an actor was not found.

func StorageFieldTooLong

func StorageFieldTooLong(field string, maxLength int) *AppError

StorageFieldTooLong creates an error indicating a field exceeds maximum length.

func StorageFieldTooShort

func StorageFieldTooShort(field string, minLength int) *AppError

StorageFieldTooShort creates an error indicating a field is below minimum length.

func StorageQuotaExceeded

func StorageQuotaExceeded(userID string, quota int64) *AppError

StorageQuotaExceeded creates an error indicating storage quota was exceeded.

func StorageRequiredFieldMissing

func StorageRequiredFieldMissing(field string) *AppError

StorageRequiredFieldMissing creates an error indicating a required field is missing.

func StorageSessionNotFound

func StorageSessionNotFound(sessionID string) *AppError

StorageSessionNotFound creates an error indicating a session was not found.

func StorageTypeUnsupported

func StorageTypeUnsupported(storageType string) *AppError

StorageTypeUnsupported creates an error for unsupported storage types.

func StorageUserNotFound

func StorageUserNotFound(username string) *AppError

StorageUserNotFound creates an error indicating a user was not found.

func StreamNewImageMissing

func StreamNewImageMissing(recordID string) *AppError

StreamNewImageMissing creates an error indicating a stream record is missing new image.

func StreamOldImageMissing

func StreamOldImageMissing(recordID string) *AppError

StreamOldImageMissing creates an error indicating a stream record is missing old image for removal.

func StreamRecordInvalid

func StreamRecordInvalid(recordID string, reason string) *AppError

StreamRecordInvalid creates an error indicating an invalid DynamoDB stream record.

func StreamRecordProcessingFailed

func StreamRecordProcessingFailed(recordID string, err error) *AppError

StreamRecordProcessingFailed creates an error indicating stream record processing failed.

func StreamRouterFailed

func StreamRouterFailed(streamType string, err error) *AppError

StreamRouterFailed creates an error indicating stream routing failed.

func StreamUnmarshalFailed

func StreamUnmarshalFailed(recordID string, imageType string, err error) *AppError

StreamUnmarshalFailed creates an error indicating failed to unmarshal stream image.

func StreamingAuthenticationRequired

func StreamingAuthenticationRequired() *AppError

StreamingAuthenticationRequired creates an error indicating authentication is required for stream.

func StreamingCircuitBreakerOpen

func StreamingCircuitBreakerOpen(connectionID string) *AppError

StreamingCircuitBreakerOpen creates an error when circuit breaker prevents recovery.

func StreamingCommandExecutionFailed

func StreamingCommandExecutionFailed() *AppError

StreamingCommandExecutionFailed creates an error indicating command execution failed.

func StreamingConnectionClosed

func StreamingConnectionClosed(connectionID string, reason string) *AppError

StreamingConnectionClosed creates an error when streaming connection is closed unexpectedly.

func StreamingConnectionNotFound

func StreamingConnectionNotFound() *AppError

StreamingConnectionNotFound creates an error indicating streaming connection was not found.

func StreamingConnectionTimeout

func StreamingConnectionTimeout(connectionID string) *AppError

StreamingConnectionTimeout creates an error when streaming connection times out.

func StreamingEventProcessingFailed

func StreamingEventProcessingFailed(eventType string, err error) *AppError

StreamingEventProcessingFailed creates an error indicating streaming event processing failed.

func StreamingFailedToSubscribe

func StreamingFailedToSubscribe() *AppError

StreamingFailedToSubscribe creates an error indicating stream subscription failed.

func StreamingFailedToUnsubscribe

func StreamingFailedToUnsubscribe() *AppError

StreamingFailedToUnsubscribe creates an error indicating stream unsubscription failed.

func StreamingHealthCheckFailed

func StreamingHealthCheckFailed(connectionID string, err error) *AppError

StreamingHealthCheckFailed creates an error when health check fails.

func StreamingInvalidCommandFormat

func StreamingInvalidCommandFormat() *AppError

StreamingInvalidCommandFormat creates an error indicating invalid command format.

func StreamingInvalidMessageFormat

func StreamingInvalidMessageFormat() *AppError

StreamingInvalidMessageFormat creates an error indicating streaming message format is invalid.

func StreamingInvalidStream

func StreamingInvalidStream() *AppError

StreamingInvalidStream creates an error indicating an invalid stream.

func StreamingRecoveryFailed

func StreamingRecoveryFailed(connectionID string, retryCount int, err error) *AppError

StreamingRecoveryFailed creates an error when streaming connection recovery fails.

func StreamingSyncFailed

func StreamingSyncFailed(connectionID string, err error) *AppError

StreamingSyncFailed creates an error when connection synchronization fails.

func StreamingUnknownMessageType

func StreamingUnknownMessageType() *AppError

StreamingUnknownMessageType creates an error indicating an unknown streaming message type.

func StreamingUnknownRoute

func StreamingUnknownRoute() *AppError

StreamingUnknownRoute creates an error indicating an unknown WebSocket route.

func SystemActorKeyRetrievalFailed

func SystemActorKeyRetrievalFailed(err error) *AppError

SystemActorKeyRetrievalFailed creates an error indicating system actor private key retrieval failed.

func SystemActorKeyRotationFailed

func SystemActorKeyRotationFailed(err error) *AppError

SystemActorKeyRotationFailed creates an error indicating system actor key rotation failed.

func TamperingDetected

func TamperingDetected(context string) *AppError

TamperingDetected creates an error indicating tampering was detected.

func TargetCollectionMissing

func TargetCollectionMissing() *AppError

TargetCollectionMissing creates an error when a target collection is missing.

func TargetIDExtractionFailed

func TargetIDExtractionFailed(context string, err error) *AppError

TargetIDExtractionFailed creates an error for target ID extraction failures.

func TimelineEntriesCreationFailed

func TimelineEntriesCreationFailed(err error) *AppError

TimelineEntriesCreationFailed creates an error indicating timeline entries creation failed.

func TimelineEntriesWriteFailed

func TimelineEntriesWriteFailed(err error) *AppError

TimelineEntriesWriteFailed creates an error indicating timeline entries write failed.

func TimelineOrderInvalid

func TimelineOrderInvalid(order string) *AppError

TimelineOrderInvalid creates an error for invalid timeline orders.

func TimelineRemovalFailed

func TimelineRemovalFailed(actorID string, err error) *AppError

TimelineRemovalFailed creates an error indicating timeline removal failed.

func TimelineRequiresField

func TimelineRequiresField(timelineType, field string) *AppError

TimelineRequiresField creates an error indicating a timeline requires a specific field.

func TimeoutError

func TimeoutError(operation string) *AppError

TimeoutError creates an error indicating an operation timed out.

func TimestampInFuture

func TimestampInFuture() *AppError

TimestampInFuture creates an error indicating timestamp cannot be in the future.

func TimestampInvalidFormat

func TimestampInvalidFormat(timestamp string) *AppError

TimestampInvalidFormat creates an error indicating invalid timestamp format.

func TimestampTooOld

func TimestampTooOld(maxAge string) *AppError

TimestampTooOld creates an error indicating timestamp is too old.

func TokenExpired

func TokenExpired() *AppError

TokenExpired creates an error indicating an authentication token has expired.

func TokenGenerationFailed

func TokenGenerationFailed(err error) *AppError

TokenGenerationFailed creates an error indicating token generation failed.

func TokenInvalid

func TokenInvalid(reason string) *AppError

TokenInvalid creates an error indicating an authentication token is invalid.

func TokenNotFound

func TokenNotFound() *AppError

TokenNotFound creates an error indicating a token was not found.

func TokenReuse

func TokenReuse() *AppError

TokenReuse creates an error indicating token reuse was detected, which is a potential security breach.

func TokenRevoked

func TokenRevoked() *AppError

TokenRevoked creates an error indicating an authentication token has been revoked.

func TokenTooOld

func TokenTooOld() *AppError

TokenTooOld creates an error indicating token is too old.

func TokenVersionMismatch

func TokenVersionMismatch() *AppError

TokenVersionMismatch creates an error indicating token version mismatch.

func TombstoneStatusCheckFailed

func TombstoneStatusCheckFailed(objectID string, err error) *AppError

TombstoneStatusCheckFailed creates an error for tombstone status check failures.

func TooManyItems

func TooManyItems(count, maxCount int) *AppError

TooManyItems creates an error indicating too many items exist.

func TooManyRequests

func TooManyRequests(resource string) *AppError

TooManyRequests creates an error indicating too many requests for a resource.

func TransactionConflict

func TransactionConflict(resource string) *AppError

TransactionConflict creates an error indicating a transaction conflict was detected.

func TransactionFailed

func TransactionFailed(err error) *AppError

TransactionFailed creates an error indicating a database transaction failed.

func TransformFunctionNotSet

func TransformFunctionNotSet() *AppError

TransformFunctionNotSet creates an error when transform function is not configured.

func TransformItemFailed

func TransformItemFailed(err error) *AppError

TransformItemFailed creates an error when item transformation fails.

func TrendAggregationFailed

func TrendAggregationFailed(trendType string, err error) *AppError

TrendAggregationFailed creates an error indicating trend aggregation failed.

func TrendAggregatorHashtagRetrieval

func TrendAggregatorHashtagRetrieval() *AppError

TrendAggregatorHashtagRetrieval creates an error indicating failed to get recent hashtags.

func TrendAggregatorLinkRetrieval

func TrendAggregatorLinkRetrieval() *AppError

TrendAggregatorLinkRetrieval creates an error indicating failed to get recent links.

func TrendAggregatorStatusRetrieval

func TrendAggregatorStatusRetrieval() *AppError

TrendAggregatorStatusRetrieval creates an error indicating failed to get recent statuses.

func TrusteeActorIDRequired

func TrusteeActorIDRequired() *AppError

TrusteeActorIDRequired creates an error indicating trustee actor ID is required.

func TrusteeAlreadyVoted

func TrusteeAlreadyVoted() *AppError

TrusteeAlreadyVoted creates an error indicating a trustee has already voted.

func TrusteeDeletionFailed

func TrusteeDeletionFailed(err error) *AppError

TrusteeDeletionFailed creates an error indicating trustee deletion failed.

func TrusteeRetrievalFailed

func TrusteeRetrievalFailed(err error) *AppError

TrusteeRetrievalFailed creates an error indicating trustee retrieval failed.

func TrusteeStorageFailed

func TrusteeStorageFailed(err error) *AppError

TrusteeStorageFailed creates an error indicating trustee storage failed.

func URLHostNotAllowed

func URLHostNotAllowed(url, host string) *AppError

URLHostNotAllowed creates an error indicating URL host not allowed.

func URLInvalid

func URLInvalid(url string) *AppError

URLInvalid creates an error indicating invalid URL format.

func URLSchemeNotAllowed

func URLSchemeNotAllowed(url, scheme string) *AppError

URLSchemeNotAllowed creates an error indicating URL scheme not allowed.

func Unauthorized

func Unauthorized(message string) *AppError

Unauthorized creates an unauthorized error

func UndoActivityInvalid

func UndoActivityInvalid(reason string) *AppError

UndoActivityInvalid creates an error indicating an invalid undo activity.

func UndoObjectNotFound

func UndoObjectNotFound(objectID string) *AppError

UndoObjectNotFound creates an error indicating an undo target activity was not found.

func UndoUnauthorized

func UndoUnauthorized(actorID, activityID string) *AppError

UndoUnauthorized creates an error indicating unauthorized access to undo an activity.

func UnexpectedSigningMethod

func UnexpectedSigningMethod() *AppError

UnexpectedSigningMethod creates an error indicating unexpected JWT signing method.

func UniqueConstraintViolated

func UniqueConstraintViolated(field string) *AppError

UniqueConstraintViolated creates an error indicating a unique constraint was violated.

func UnmarshalingFailed

func UnmarshalingFailed(dataType string, err error) *AppError

UnmarshalingFailed creates an error indicating data unmarshaling failed.

func UnsupportedPrivateKeyType

func UnsupportedPrivateKeyType() *AppError

UnsupportedPrivateKeyType creates an error indicating unsupported private key type.

func UnsupportedTimelineType

func UnsupportedTimelineType(timelineType string) *AppError

UnsupportedTimelineType creates an error for unsupported timeline types.

func UpdateActivityInvalid

func UpdateActivityInvalid(reason string) *AppError

UpdateActivityInvalid creates an error indicating an invalid update activity.

func UpdateFailed

func UpdateFailed(itemType string, err error) *AppError

UpdateFailed creates an error indicating item update failed.

func UpdateObjectNotFound

func UpdateObjectNotFound(objectID string) *AppError

UpdateObjectNotFound creates an error indicating an update target object was not found.

func UpdateUnauthorized

func UpdateUnauthorized(actorID, objectID string) *AppError

UpdateUnauthorized creates an error indicating unauthorized access to update an object.

func UploadLimitsInvalid

func UploadLimitsInvalid() *AppError

UploadLimitsInvalid creates an error for invalid upload limits.

func UserAlreadyExists

func UserAlreadyExists(username string) *AppError

UserAlreadyExists creates an error indicating a user already exists.

func UserDevicesRetrievalFailed

func UserDevicesRetrievalFailed(err error) *AppError

UserDevicesRetrievalFailed creates an error indicating user devices retrieval failed.

func UserIDRequired

func UserIDRequired() *AppError

UserIDRequired creates an error when user ID is required.

func UserNotApproved

func UserNotApproved(username string) *AppError

UserNotApproved creates an error indicating the user account is not approved.

func UserNotFound

func UserNotFound(username string) *AppError

UserNotFound creates an error indicating the specified user was not found.

func UserRetrievalFailed

func UserRetrievalFailed(err error) *AppError

UserRetrievalFailed creates an error indicating user retrieval failed.

func UserSessionsRetrievalFailed

func UserSessionsRetrievalFailed(err error) *AppError

UserSessionsRetrievalFailed creates an error indicating user sessions retrieval failed.

func UserSuspended

func UserSuspended(username string) *AppError

UserSuspended creates an error indicating the user account is suspended.

func UsernameConsecutiveUnderscores

func UsernameConsecutiveUnderscores() *AppError

UsernameConsecutiveUnderscores creates an error indicating username cannot contain consecutive underscores.

func UsernameEmpty

func UsernameEmpty() *AppError

UsernameEmpty creates an error indicating username cannot be empty.

func UsernameExtractionFailed

func UsernameExtractionFailed(context string, err error) *AppError

UsernameExtractionFailed creates an error for username extraction failures.

func UsernameInvalidCharacters

func UsernameInvalidCharacters() *AppError

UsernameInvalidCharacters creates an error indicating username contains invalid characters.

func UsernameInvalidFormat

func UsernameInvalidFormat() *AppError

UsernameInvalidFormat creates an error indicating username format is invalid.

func UsernameInvalidLength

func UsernameInvalidLength(minVal, maxVal int) *AppError

UsernameInvalidLength creates an error indicating username length is invalid.

func UsernameStartsOrEndsWithUnderscore

func UsernameStartsOrEndsWithUnderscore() *AppError

UsernameStartsOrEndsWithUnderscore creates an error indicating username cannot start or end with underscore.

func UsernameTaken

func UsernameTaken(username string) *AppError

UsernameTaken creates an error when a username is already taken.

func ValidationFailed

func ValidationFailed(field, message string) *AppError

ValidationFailed creates a validation error

func ValidationFailedWithField

func ValidationFailedWithField(field string) *AppError

ValidationFailedWithField creates an error when general validation fails.

func ValueOutOfRange

func ValueOutOfRange(field string, minVal, maxVal, actual interface{}) *AppError

ValueOutOfRange creates an error indicating a value is outside the allowed range.

func VideoDurationInvalid

func VideoDurationInvalid() *AppError

VideoDurationInvalid creates an error for invalid video duration.

func VideoFileTooLarge

func VideoFileTooLarge(fileSize int64, maxSize int64) *AppError

VideoFileTooLarge creates an error indicating video file size exceeds limit.

func VideoInvalidFormat

func VideoInvalidFormat(format string) *AppError

VideoInvalidFormat creates an error indicating invalid video format.

func WalletAddressMismatch

func WalletAddressMismatch() *AppError

WalletAddressMismatch creates an error indicating a wallet address mismatch.

func WalletAlreadyLinked

func WalletAlreadyLinked() *AppError

WalletAlreadyLinked creates an error indicating a wallet is already linked to another account.

func WalletChallengeExpired

func WalletChallengeExpired() *AppError

WalletChallengeExpired creates an error indicating a wallet authentication challenge has expired.

func WalletCheckFailed

func WalletCheckFailed(err error) *AppError

WalletCheckFailed creates an error indicating wallet check failed.

func WalletDeletionFailed

func WalletDeletionFailed(err error) *AppError

WalletDeletionFailed creates an error indicating wallet deletion failed.

func WalletRetrievalFailed

func WalletRetrievalFailed(err error) *AppError

WalletRetrievalFailed creates an error indicating wallet retrieval failed.

func WalletSignatureInvalid

func WalletSignatureInvalid(reason string) *AppError

WalletSignatureInvalid creates an error indicating a wallet signature is invalid.

func WalletStorageFailed

func WalletStorageFailed(err error) *AppError

WalletStorageFailed creates an error indicating wallet storage failed.

func WebAuthnChallengeStorageFailed

func WebAuthnChallengeStorageFailed(err error) *AppError

WebAuthnChallengeStorageFailed creates an error indicating WebAuthn challenge storage failed.

func WebAuthnLoginFailed

func WebAuthnLoginFailed(reason string) *AppError

WebAuthnLoginFailed creates an error indicating WebAuthn authentication failed.

func WebAuthnNotConfigured

func WebAuthnNotConfigured() *AppError

WebAuthnNotConfigured creates an error indicating WebAuthn is not configured.

func WebAuthnRegistrationFailed

func WebAuthnRegistrationFailed(reason string) *AppError

WebAuthnRegistrationFailed creates an error indicating WebAuthn registration failed.

func WebAuthnServiceInitFailed

func WebAuthnServiceInitFailed(err error) *AppError

WebAuthnServiceInitFailed creates an error indicating WebAuthn service initialization failed.

func WebFingerFailed

func WebFingerFailed(identifier string, err error) *AppError

WebFingerFailed creates an error indicating WebFinger lookup failed.

func WebFingerNotFound

func WebFingerNotFound(identifier string) *AppError

WebFingerNotFound creates an error indicating a WebFinger resource was not found.

func WebSocketCostAggregationFailed

func WebSocketCostAggregationFailed(err error) *AppError

WebSocketCostAggregationFailed creates an error indicating WebSocket cost aggregation failed.

func WebSocketCostAllAlertMethodsFailed

func WebSocketCostAllAlertMethodsFailed() *AppError

WebSocketCostAllAlertMethodsFailed creates an error indicating all alert methods failed.

func WebSocketCostCreateWebhookRequest

func WebSocketCostCreateWebhookRequest() *AppError

WebSocketCostCreateWebhookRequest creates an error indicating webhook request creation failed.

func WebSocketCostGetHighCostUsers

func WebSocketCostGetHighCostUsers() *AppError

WebSocketCostGetHighCostUsers creates an error indicating failed to get high cost users.

func WebSocketCostGetIdleConnections

func WebSocketCostGetIdleConnections() *AppError

WebSocketCostGetIdleConnections creates an error indicating failed to get idle connections.

func WebSocketCostGetStaleConnections

func WebSocketCostGetStaleConnections() *AppError

WebSocketCostGetStaleConnections creates an error indicating failed to get stale connections.

func WebSocketCostMarshalAlertMessage

func WebSocketCostMarshalAlertMessage() *AppError

WebSocketCostMarshalAlertMessage creates an error indicating alert message marshaling failed.

func WebSocketCostPublishSNSMessage

func WebSocketCostPublishSNSMessage() *AppError

WebSocketCostPublishSNSMessage creates an error indicating SNS message publishing failed.

func WebSocketCostTrackIdleConnections

func WebSocketCostTrackIdleConnections() *AppError

WebSocketCostTrackIdleConnections creates an error indicating failed to track idle connections.

func WebSocketCostWebhookNon2xxStatus

func WebSocketCostWebhookNon2xxStatus() *AppError

WebSocketCostWebhookNon2xxStatus creates an error indicating webhook returned non-2xx status.

func WebSocketCostWebhookRequestFailed

func WebSocketCostWebhookRequestFailed() *AppError

WebSocketCostWebhookRequestFailed creates an error indicating webhook request failed.

func WorkflowInvalidState

func WorkflowInvalidState(currentState string) *AppError

WorkflowInvalidState creates an error indicating a workflow is in an invalid state.

func WorkflowStepFailed

func WorkflowStepFailed(step string, err error) *AppError

WorkflowStepFailed creates an error indicating a workflow step failed.

func WorkflowTimeout

func WorkflowTimeout(workflowName string, duration int64) *AppError

WorkflowTimeout creates an error indicating workflow execution timed out.

func WrapError

func WrapError(err error, code ErrorCode, category ErrorCategory, message string) *AppError

WrapError wraps an existing error as an AppError

func WrapErrorf

func WrapErrorf(err error, code ErrorCode, category ErrorCategory, format string, args ...interface{}) *AppError

WrapErrorf wraps an existing error as an AppError with formatted message

func WrapRemoteError

func WrapRemoteError(err error, operation, remoteInstance string) *AppError

WrapRemoteError wraps an error with remote operation context and makes it retryable.

func WrapWithContext

func WrapWithContext(err error, context string) *AppError

WrapWithContext wraps an error with additional context information.

func WrapWithOperation

func WrapWithOperation(err error, operation string) *AppError

WrapWithOperation wraps an error with operation metadata.

func WrapWithResource

func WrapWithResource(err error, resourceType, resourceID string) *AppError

WrapWithResource wraps an error with resource metadata.

func (*AppError) AsNonRetryable

func (e *AppError) AsNonRetryable() *AppError

AsNonRetryable marks this error as non-retryable

func (*AppError) AsRetryable

func (e *AppError) AsRetryable() *AppError

AsRetryable marks this error as retryable

func (*AppError) Clone

func (e *AppError) Clone() *AppError

Clone creates a shallow copy of the error, including a copy of Metadata map, so callers can safely add context without mutating shared instances.

func (*AppError) Error

func (e *AppError) Error() string

Error implements the standard error interface

func (*AppError) Unwrap

func (e *AppError) Unwrap() error

Unwrap allows errors.Is and errors.As to work with the underlying error

func (*AppError) WithInternalError

func (e *AppError) WithInternalError(err error) *AppError

WithInternalError wraps another error as the internal cause

func (*AppError) WithInternalMessage

func (e *AppError) WithInternalMessage(msg string) *AppError

WithInternalMessage adds or updates the internal message

func (*AppError) WithMetadata

func (e *AppError) WithMetadata(key string, value interface{}) *AppError

WithMetadata adds metadata to the error

type ErrorCategory

type ErrorCategory string

ErrorCategory represents the domain/category of an error

const (
	// CategoryAuth represents authentication and authorization errors
	CategoryAuth ErrorCategory = "AUTH"

	// CategoryStorage represents database and storage errors
	CategoryStorage ErrorCategory = "STORAGE"

	// CategoryFederation represents ActivityPub federation errors
	CategoryFederation ErrorCategory = "FEDERATION"

	// CategoryValidation represents input validation errors
	CategoryValidation ErrorCategory = "VALIDATION"

	// CategoryAPI represents API-specific errors (REST/GraphQL)
	CategoryAPI ErrorCategory = "API"

	// CategoryLambda represents AWS Lambda-specific errors
	CategoryLambda ErrorCategory = "LAMBDA"

	// CategoryBusiness represents business logic errors
	CategoryBusiness ErrorCategory = "BUSINESS"

	// CategoryMedia represents media processing errors
	CategoryMedia ErrorCategory = "MEDIA"

	// CategoryStreaming represents WebSocket streaming errors
	CategoryStreaming ErrorCategory = "STREAMING"

	// CategoryModeration represents content moderation errors
	CategoryModeration ErrorCategory = "MODERATION"

	// CategoryInternal represents internal system errors
	CategoryInternal ErrorCategory = "INTERNAL"

	// CategoryExternal represents external service errors
	CategoryExternal ErrorCategory = "EXTERNAL"
)

func AllCategories

func AllCategories() []ErrorCategory

AllCategories returns all valid error categories

func GetErrorCategory

func GetErrorCategory(err error) ErrorCategory

GetErrorCategory extracts the error category from an error

func (ErrorCategory) IsValid

func (c ErrorCategory) IsValid() bool

IsValid checks if the error category is valid

func (ErrorCategory) String

func (c ErrorCategory) String() string

String returns the string representation of the error category

type ErrorCode

type ErrorCode string

ErrorCode represents standardized error codes across the application

const (
	// Generic errors
	CodeNotFound            ErrorCode = "NOT_FOUND"
	CodeAlreadyExists       ErrorCode = "ALREADY_EXISTS"
	CodeInvalidInput        ErrorCode = "INVALID_INPUT"
	CodeUnauthorized        ErrorCode = "UNAUTHORIZED"
	CodeForbidden           ErrorCode = "FORBIDDEN"
	CodeTimeout             ErrorCode = "TIMEOUT"
	CodeRateLimited         ErrorCode = "RATE_LIMITED"
	CodeInternal            ErrorCode = "INTERNAL_ERROR"
	CodeGone                ErrorCode = "GONE"
	CodeUnprocessableEntity ErrorCode = "UNPROCESSABLE_ENTITY"
)

Common error codes

const (
	CodeAuthFailed        ErrorCode = "AUTH_FAILED"
	CodeTokenExpired      ErrorCode = "TOKEN_EXPIRED"
	CodeTokenInvalid      ErrorCode = "TOKEN_INVALID"
	CodeTokenRevoked      ErrorCode = "TOKEN_REVOKED"
	CodeTokenReuse        ErrorCode = "TOKEN_REUSE"
	CodeSessionExpired    ErrorCode = "SESSION_EXPIRED"
	CodeSessionInvalid    ErrorCode = "SESSION_INVALID"
	CodeInsufficientScope ErrorCode = "INSUFFICIENT_SCOPE"
	CodeAccountSuspended  ErrorCode = "ACCOUNT_SUSPENDED"
	CodeInvalidPassword   ErrorCode = "INVALID_PASSWORD"
)

Authentication and authorization error codes

const (
	CodeDatabaseConnection   ErrorCode = "DATABASE_CONNECTION_FAILED"
	CodeQueryFailed          ErrorCode = "QUERY_FAILED"
	CodeTransactionFailed    ErrorCode = "TRANSACTION_FAILED"
	CodeIndexError           ErrorCode = "INDEX_ERROR"
	CodeConcurrencyError     ErrorCode = "CONCURRENCY_ERROR"
	CodeConstraintViolated   ErrorCode = "CONSTRAINT_VIOLATED"
	CodeStorageQuotaExceeded ErrorCode = "STORAGE_QUOTA_EXCEEDED"
)

Storage and database error codes

const (
	CodeActivityParsingFailed   ErrorCode = "ACTIVITY_PARSING_FAILED"
	CodeSignatureVerifyFailed   ErrorCode = "SIGNATURE_VERIFICATION_FAILED"
	CodeRemoteFetchFailed       ErrorCode = "REMOTE_FETCH_FAILED"
	CodeDeliveryFailed          ErrorCode = "DELIVERY_FAILED"
	CodeInboxProcessingFailed   ErrorCode = "INBOX_PROCESSING_FAILED"
	CodeOutboxProcessingFailed  ErrorCode = "OUTBOX_PROCESSING_FAILED"
	CodeUnsupportedActivityType ErrorCode = "UNSUPPORTED_ACTIVITY_TYPE"
	CodeFederationBlocked       ErrorCode = "FEDERATION_BLOCKED"
	CodeActorNotFound           ErrorCode = "ACTOR_NOT_FOUND"
	CodeInvalidActorURI         ErrorCode = "INVALID_ACTOR_URI"
)

Federation and ActivityPub error codes

const (
	CodeValidationFailed     ErrorCode = "VALIDATION_FAILED"
	CodeRequiredFieldMissing ErrorCode = "REQUIRED_FIELD_MISSING"
	CodeFieldTooLong         ErrorCode = "FIELD_TOO_LONG"
	CodeFieldTooShort        ErrorCode = "FIELD_TOO_SHORT"
	CodeInvalidFormat        ErrorCode = "INVALID_FORMAT"
	CodeInvalidCharacters    ErrorCode = "INVALID_CHARACTERS"
	CodeValueOutOfRange      ErrorCode = "VALUE_OUT_OF_RANGE"
)

Validation error codes

const (
	CodeBadRequest              ErrorCode = "BAD_REQUEST"
	CodeMethodNotAllowed        ErrorCode = "METHOD_NOT_ALLOWED"
	CodeContentTooLarge         ErrorCode = "CONTENT_TOO_LARGE"
	CodeAPIUnsupportedMediaType ErrorCode = "UNSUPPORTED_MEDIA_TYPE_API"
	CodeAPIVersionNotSupported  ErrorCode = "API_VERSION_NOT_SUPPORTED"
	CodeMissingHeader           ErrorCode = "MISSING_HEADER"
	CodeInvalidHeader           ErrorCode = "INVALID_HEADER"
)

API error codes

const (
	CodeLambdaTimeout         ErrorCode = "LAMBDA_TIMEOUT"
	CodeLambdaColdStart       ErrorCode = "LAMBDA_COLD_START"
	CodeLambdaMemoryExceeded  ErrorCode = "LAMBDA_MEMORY_EXCEEDED"
	CodeSQSProcessingFailed   ErrorCode = "SQS_PROCESSING_FAILED"
	CodeEventProcessingFailed ErrorCode = "EVENT_PROCESSING_FAILED"
	CodeDLQRetryExhausted     ErrorCode = "DLQ_RETRY_EXHAUSTED"
)

Lambda-specific error codes

const (
	CodeMediaTooLarge         ErrorCode = "MEDIA_TOO_LARGE"
	CodeUnsupportedMediaType  ErrorCode = "UNSUPPORTED_MEDIA_TYPE"
	CodeMediaProcessingFailed ErrorCode = "MEDIA_PROCESSING_FAILED"
	CodeTranscodingFailed     ErrorCode = "TRANSCODING_FAILED"
	CodeThumbnailFailed       ErrorCode = "THUMBNAIL_FAILED"
	CodeMediaUploadFailed     ErrorCode = "MEDIA_UPLOAD_FAILED"
)

Media processing error codes

const (
	CodeContentBlocked     ErrorCode = "CONTENT_BLOCKED"
	CodeModerationFailed   ErrorCode = "MODERATION_FAILED"
	CodePatternMatchFailed ErrorCode = "PATTERN_MATCH_FAILED"
	CodeContentFlagged     ErrorCode = "CONTENT_FLAGGED"
	CodeSpamDetected       ErrorCode = "SPAM_DETECTED"
)

Moderation error codes

const (
	CodeConnectionClosed   ErrorCode = "CONNECTION_CLOSED"
	CodeSubscriptionFailed ErrorCode = "SUBSCRIPTION_FAILED"
	CodeStreamingTimeout   ErrorCode = "STREAMING_TIMEOUT"
	CodeMessageTooLarge    ErrorCode = "MESSAGE_TOO_LARGE"
	CodeTooManyConnections ErrorCode = "TOO_MANY_CONNECTIONS"
)

Streaming error codes

const (
	CodeOperationNotAllowed    ErrorCode = "OPERATION_NOT_ALLOWED"
	CodeInvalidStateTransition ErrorCode = "INVALID_STATE_TRANSITION"
	CodeQuotaExceeded          ErrorCode = "QUOTA_EXCEEDED"
	CodeConflict               ErrorCode = "CONFLICT"
	CodeDependencyNotMet       ErrorCode = "DEPENDENCY_NOT_MET"
	CodeBusinessRuleViolated   ErrorCode = "BUSINESS_RULE_VIOLATED"
)

Business logic error codes

const (
	CodeExternalServiceUnavailable  ErrorCode = "EXTERNAL_SERVICE_UNAVAILABLE"
	CodeExternalServiceTimeout      ErrorCode = "EXTERNAL_SERVICE_TIMEOUT"
	CodeExternalAPIError            ErrorCode = "EXTERNAL_API_ERROR"
	CodeThirdPartyIntegrationFailed ErrorCode = "THIRD_PARTY_INTEGRATION_FAILED"
)

External service error codes

func GetErrorCode

func GetErrorCode(err error) ErrorCode

GetErrorCode extracts the error code from an error

func (ErrorCode) GetHTTPStatusCode

func (c ErrorCode) GetHTTPStatusCode() int

GetHTTPStatusCode returns the appropriate HTTP status code for the error code

func (ErrorCode) IsValid

func (c ErrorCode) IsValid() bool

IsValid checks if the error code is valid

func (ErrorCode) String

func (c ErrorCode) String() string

String returns the string representation of the error code

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL