Creates a ResponseException for missing expected data.
Parameters
$apiNamestringrequired- The name of the API/provider.
$fieldNamestringrequired- The field that was expected but missing.
Source
public static function fromMissingData(string $apiName, string $fieldName): self
{
$message = sprintf('Unexpected %s API response: Missing the "%s" key.', $apiName, $fieldName);
return new self($message);
}
Changelog
| Version | Description |
|---|---|
| 0.2.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.