quote, exactly
like Laravel’s own validation.
What Laravel does with each
- Logged
- Rendered
Every failure carries its context to the log: the site, method, path, status, error name and the
request id (never a query, body or header).
Reacting to one case
Catch only the class you want to react to.AttractException catches everything the SDK throws,
config errors and refused arguments included.
The classes
All inFetchski\AttractCmsLaravel\Exceptions.
siteMessage()
The site’s own words: what it refused and how to fix it. Show it to people when it says more than
errorName().reason()
The client’s words when the site’s are missing. It names hosts and settings: for logs and
developers, never for people.
A refused argument (an empty id, a blank required filter, an upload named without an extension) is a
RequestNotSent too: status 0, errorName() notSent, the message naming the route
(GET /api/v1/@apostrophecms/blog/{_id}), the engine’s own error as getPrevious(). Nothing was sent.What is retried
A call that failed in a way that is safe to repeat is sent again, so your app never has to.Rate limits
Any method. Waits
Retry-After (1 s when unsaid); a wait over a minute is thrown for you to schedule.Reads
No answer, or a 502, 503 or 504: after 0.5 s, then 1 s.
Writes
Only when they never reached the site. Never after a timeout or a 5xx.
retries (2 by default) caps the extra attempts, and 0 turns them off. Each attempt is signed afresh.
Next: paging
One call for a whole list.