ClientFailureMessage
Factory for structured client-facing failure messages.
Encodes failure information into a standardized string format using FailureMessageFormat, categorized by client failure kind (invalid request, forbidden, not found).
Attributes
- Source
- ClientFailureMessage.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ClientFailureMessage.type
Members list
Type members
Classlikes
Classification of client failure kinds.
Classification of client failure kinds.
Attributes
- Source
- ClientFailureMessage.scala
- Supertypes
-
trait Enumtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Value members
Concrete methods
Builds an ErrorKey for a client failure, validating the key format.
Builds an ErrorKey for a client failure, validating the key format.
Value parameters
- code
-
the failure code to attach
- domain
-
the error domain
- kind
-
the client failure kind
- reason
-
the specific reason
Attributes
- Returns
-
an ErrorKey with the validated or fallback key
- Source
- ClientFailureMessage.scala
Formats a forbidden failure message with the default failure code.
Formats a forbidden failure message with the default failure code.
Value parameters
- detail
-
optional additional detail
- domain
-
the error domain
- message
-
human-readable description
- reason
-
the specific reason within the domain
Attributes
- Returns
-
the encoded failure message string
- Source
- ClientFailureMessage.scala
Formats a forbidden failure message with a custom failure code.
Formats a forbidden failure message with a custom failure code.
Value parameters
- code
-
the failure code to attach
- detail
-
optional additional detail
- domain
-
the error domain
- message
-
human-readable description
- reason
-
the specific reason within the domain
Attributes
- Returns
-
the encoded failure message string
- Source
- ClientFailureMessage.scala
Formats an invalid-request failure message with the default failure code.
Formats an invalid-request failure message with the default failure code.
Value parameters
- detail
-
optional additional detail appended after a separator
- domain
-
the error domain (e.g., "account", "transaction")
- message
-
human-readable description
- reason
-
the specific reason within the domain
Attributes
- Returns
-
the encoded failure message string
- Source
- ClientFailureMessage.scala
Formats an invalid-request failure message with a custom failure code.
Formats an invalid-request failure message with a custom failure code.
Value parameters
- code
-
the failure code to attach
- detail
-
optional additional detail
- domain
-
the error domain
- message
-
human-readable description
- reason
-
the specific reason within the domain
Attributes
- Returns
-
the encoded failure message string
- Source
- ClientFailureMessage.scala
Formats a not-found failure message with the default failure code.
Formats a not-found failure message with the default failure code.
Value parameters
- detail
-
optional additional detail
- domain
-
the error domain
- message
-
human-readable description
- reason
-
the specific reason within the domain
Attributes
- Returns
-
the encoded failure message string
- Source
- ClientFailureMessage.scala
Formats a not-found failure message with a custom failure code.
Formats a not-found failure message with a custom failure code.
Value parameters
- code
-
the failure code to attach
- detail
-
optional additional detail
- domain
-
the error domain
- message
-
human-readable description
- reason
-
the specific reason within the domain
Attributes
- Returns
-
the encoded failure message string
- Source
- ClientFailureMessage.scala
Concrete fields
Failure code for forbidden errors.
Failure code for invalid request errors.
Failure code for not-found errors.