Handle cache miss and redirect in SignedPage
Added a check for `_sig` being `null` to handle cache misses or missing `sid`. Logged a warning with `Sid` and `EnvelopeKey` details when this occurs. Implemented a redirection to the report page (`/envelope/{EnvelopeKey}/report`) using `Navigation.NavigateTo` with `forceLoad: true`. Added an early return to prevent further execution after redirection.
This commit is contained in:
@@ -120,6 +120,18 @@
|
|||||||
_sig = cached;
|
_sig = cached;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Cache miss or missing sid — redirect back to report page
|
||||||
|
if (_sig is null)
|
||||||
|
{
|
||||||
|
Logger.LogWarning(
|
||||||
|
"[SignedPage] Cache miss or no sid={Sid} for {EnvelopeKey}, redirecting to report page.",
|
||||||
|
Sid, EnvelopeKey);
|
||||||
|
Navigation.NavigateTo(
|
||||||
|
$"/envelope/{Uri.EscapeDataString(EnvelopeKey)}/report",
|
||||||
|
forceLoad: true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var pdfBytes = await PageDataService.GetDocumentAsync(_receiverUser);
|
var pdfBytes = await PageDataService.GetDocumentAsync(_receiverUser);
|
||||||
|
|||||||
Reference in New Issue
Block a user