ScryfallException class

A ScryfallException object represents a failure to find information or understand the input you provided to the API. ScryfallException objects are always transmitted with the appropriate 4XX or 5XX HTTP status code.

Implemented types
Annotations
  • @JsonSerializable()

Constructors

ScryfallException({required int status, required String code, required String details, String? type, List<String>? warnings})
Constructs a ScryfallException by setting its properties.
ScryfallException.fromJson(Map<String, dynamic> json)
Constructs a ScryfallException from JSON.
factory

Properties

code String
A computer-friendly string representing the appropriate HTTP status code.
final
details String
A human-readable string explaining the error.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status int
An integer HTTP status code for this error.
final
type String?
A computer-friendly string that provides additional context for the main error. For example, an endpoint many generate HTTP 404 errors for different kinds of input. This field will provide a label for the specific kind of 404 failure, such as ambiguous.
final
warnings List<String>?
If your input also generated non-failure warnings, they will be provided as human-readable strings in this array.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited