InvalidFieldValueException
extends ShipEngineException
in package
This error occurs when a field has been set to an invalid value.
Table of Contents
- $field_name : string
- The name of the invalid field.
- $field_value : string
- The value of the invalid field.
- $errorCode : string|null
- A code that indicates the specific error that occurred, such as missing a required field, an invalid address, a timeout, etc.
- $requestId : string|null
- If the error came from the ShipEngine server (as opposed to a client-side error) then this is the unique ID of the HTTP request that returned the error.
- $source : string|null
- Indicates where the error originated. This lets you know whether you should contact ShipEngine for support or if you should contact the carrier or marketplace instead.
- $type : string|null
- Indicates the type of error that occurred, such as a validation error, a security error, etc.
- $url : string|null
- Some errors include a URL that you can visit to learn more about the error, find out how to resolve it, or get support.
- __construct() : mixed
- Instantiates a client-side error.
- __get() : mixed
- jsonSerialize() : array<string|int, mixed>
Properties
$field_name
The name of the invalid field.
public
string
$field_name
$field_value
The value of the invalid field.
public
string
$field_value
$errorCode
A code that indicates the specific error that occurred, such as missing a required field, an invalid address, a timeout, etc.
private
string|null
$errorCode
$requestId
If the error came from the ShipEngine server (as opposed to a client-side error) then this is the unique ID of the HTTP request that returned the error.
private
string|null
$requestId
You can use this ID when contacting ShipEngine support for help.
$source
Indicates where the error originated. This lets you know whether you should contact ShipEngine for support or if you should contact the carrier or marketplace instead.
private
string|null
$source
Tags
$type
Indicates the type of error that occurred, such as a validation error, a security error, etc.
private
string|null
$type
Tags
$url
Some errors include a URL that you can visit to learn more about the error, find out how to resolve it, or get support.
private
string|null
$url
Methods
__construct()
Instantiates a client-side error.
public
__construct(string $field_name, string $reason, mixed $field_value) : mixed
Parameters
- $field_name : string
- $reason : string
- $field_value : mixed
Return values
mixed —__get()
public
__get(string $property) : mixed
Parameters
- $property : string
Return values
mixed —jsonSerialize()
public
jsonSerialize() : array<string|int, mixed>