PrismaClientKnownRequestError class
Prisma Client throws a PrismaClientKnownRequestError exception if the query engine returns a known error related to the request - for example, a unique constraint violation. See https://www.prisma.io/docs/reference/api-reference/error-reference#prismaclientknownrequesterror
- Implemented types
- Annotations
-
- @JsonSerializable(createFactory: true, createToJson: false)
Constructors
-
PrismaClientKnownRequestError(String message, {required String code, required Map<
String, dynamic> ? meta, required String clientVersion}) -
const
-
PrismaClientKnownRequestError.fromJson(Map<
String, dynamic> json) -
factory
Properties
- clientVersion → String
-
Version of Prisma Client (for example, 2.19.0)
final
- code → String
-
A Prisma-specific error code.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- message → String
-
Error message associated with error code.
final
-
meta
→ Map<
String, dynamic> ? -
Additional information about the error - for example,
the field that caused the error:
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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