MisarMailPlanLimitError class
Thrown when the subscription attached to the API key blocks the call.
MisarMail meters per-plan server-side: a spent allowance answers 429 and a feature not on the plan answers 402. This is a distinct type rather than a generic 429 because retrying cannot help until the allowance resets or the plan changes — the client stops retrying on sight.
Surface upgradeUrl rather than reporting a bare failure.
- Inheritance
-
- Object
- MisarMailError
- MisarMailPlanLimitError
Constructors
- MisarMailPlanLimitError(int status, String message, {String? plan, String? upgradeUrl, int? retryAfter, String? feature})
-
MisarMailPlanLimitError.from(int status, Map<
String, dynamic> body, Map<String, String> headers) -
Build from a decoded body plus the response headers. Headers are
authoritative; the offer body is the fallback when a proxy strips them.
factory
Properties
-
details
→ Map<
String, dynamic> ? -
finalinherited
- errorType → String
-
finalinherited
- feature → String?
-
The allowance that was exhausted.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isPlanDenied → bool
-
The key is valid but the account's subscription does not cover this call:
the feature is not in the plan, a plan limit is exhausted, or a volume
ceiling was hit. Gating is decided server-side from the subscription
behind the key, so this is the signal to prompt an upgrade — without
parsing error strings.
no setterinherited
- isRetryable → bool
-
Worth retrying as-is: transient server or rate-limit conditions.
no setterinherited
-
The key was rejected outright — missing, revoked, expired, or issued for
a different product.
no setterinherited
- message → String
-
finalinherited
- plan → String?
-
The account's current plan slug, when the API reports it.
final
- retryAfter → int?
-
Seconds until the allowance resets, when supplied.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → int
-
finalinherited
- upgradeUrl → String?
-
Pricing page to send the user to.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited