crater-invoice-inc/crater · error
Link Expired.
Error message
Link Expired.
What it means
The customer-side Estimate PDF endpoint aborts with HTTP 403 when the EmailLog record that carried the estimate link has passed its expiry window; the shared download link is no longer trusted, so the customer must request a fresh link from the company.
Solutions
- Check $emailLog->isExpired() before rendering and return a friendly 403/JSON error page pointing the user to request a new link
- Regenerate the EmailLog (and its hash) by re-sending the estimate email so the customer gets a valid URL
- Extend the expiry window in EmailLog if links are expiring too aggressively for the business workflow
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at app/Http/Controllers/V1/Customer/EstimatePdfController.php:44 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of crater-invoice-inc/crater@05d5ce26fd (2026-09-13).
Data as JSON: /api/errors/0465d9b27e8446cc.
Report an issue: GitHub.
Appendix: source
Thrown at app/Http/Controllers/V1/Customer/EstimatePdfController.php:44
$estimate->company_id
);
if ($notifyEstimateViewed == 'YES') {
$data['estimate'] = Estimate::findOrFail($estimate->id)->toArray();
$data['user'] = Customer::find($estimate->customer_id)->toArray();
$notificationEmail = CompanySetting::getSetting(
'notification_email',
$estimate->company_id
);
\Mail::to($notificationEmail)->send(new EstimateViewedMail($data));
}
}
return $estimate->getGeneratedPDFOrStream('estimate');
}
abort(403, 'Link Expired.');
}
public function getEstimate(EmailLog $emailLog)
{
$estimate = Estimate::find($emailLog->mailable_id);
return new EstimateResource($estimate);
}
}
View on GitHub (pinned to 05d5ce26fd)