Skip to content

Commit 836ce19

Browse files
committed
domain_fronter: surface quota-exhaustion hint in timeout error (#99)
The 504 "Relay timeout" message was too terse — users hit it after their daily UrlFetchApp quota exhausts and had no idea why a setup that worked yesterday suddenly started failing. New message explicitly names the most common cause (daily quota reset at 00:00 UTC) and points at the script's Executions tab for the real server-side error. Same three-line explanation #99, #111, #105 each independently got from me in issue comments — now it's in the browser page body where the user actually sees it.
1 parent 889f94c commit 836ce19

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

src/domain_fronter.rs

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -733,9 +733,24 @@ impl DomainFronter {
733733
return error_response(502, &format!("Relay error: {}", e));
734734
}
735735
Err(_) => {
736+
// Timeout here means Apps Script didn't respond within
737+
// REQUEST_TIMEOUT_SECS (currently 25). The most common
738+
// cause by far is the account's daily UrlFetchApp quota
739+
// being exhausted — once Google kills the script mid-exec,
740+
// our relay hangs until timeout because no body ever comes
741+
// back. Surface that possibility in the message instead
742+
// of just "timeout", which has burned several users asking
743+
// "why did it work yesterday" (see issues #99, #111, #105).
736744
self.relay_failures.fetch_add(1, Ordering::Relaxed);
737-
tracing::error!("Relay timeout");
738-
return error_response(504, "Relay timeout");
745+
tracing::error!("Relay timeout — Apps Script unresponsive");
746+
return error_response(
747+
504,
748+
"Relay timeout — Apps Script did not respond. \
749+
Most likely cause: daily UrlFetchApp quota exhausted \
750+
(resets 00:00 UTC). Other possibilities: script.google.com \
751+
unreachable from your network, or the Apps Script edge is having issues. \
752+
Check the script's Executions tab at script.google.com for the real error.",
753+
);
739754
}
740755
};
741756
self.bytes_relayed.fetch_add(bytes.len() as u64, Ordering::Relaxed);

0 commit comments

Comments
 (0)