Create a new YSweetError.
An object representing metadata associated with the error.
An object representing metadata associated with the error.
Optional
stackStatic
Optional
prepareOptional override for formatting stack traces
Static
stackStatic
captureStatic
fromIn development, next.js passes error objects to the client but strips out everything but the
message
field. This method allows us to reconstruct the original error object.
The error message string to reconstruct a payload from.
A YSweetError object.
Static
getConvert the message to an error string that can be displayed to the user.
The error string can also be used with YSweetError.fromMessage to reconstruct the payload object, which is useful in the context of Next.js, which will only pass an error string from the server to the client.
The payload object to convert to a string.
A string representation of the error.
An error returned by the y-sweet SDK.