MCPcopy Create free account
hub / github.com/satisfactory-factories/application / checkResponseForOutdatedClient

Function checkResponseForOutdatedClient

web/src/utils/api.ts:50–59  ·  view source on GitHub ↗
(response: Response)

Source from the content-addressed store, hash-verified

48
49// Reads don't fail on a stale client, they just say so in a header.
50export const checkResponseForOutdatedClient = (response: Response): boolean => {
51 const minimum = readHeader(response, CLIENT_OUTDATED_HEADER)
52 if (!minimum) {
53 return false
54 }
55
56 console.warn(`api: The server reports this client (${config.appVersion}) is below its minimum of ${minimum}.`)
57 announceClientOutdated(minimum)
58 return true
59}
60
61// 426 is the gate's status, but match on the body code as well so a proxy rewriting the status
62// can't turn a required reload into an unexplained failure.

Callers 1

api.spec.tsFile · 0.90

Calls 2

readHeaderFunction · 0.85
announceClientOutdatedFunction · 0.85

Tested by

no test coverage detected