Skip to Content
Technical GuideFailure and Degradation

Failure and degradation

A failed request, an empty result and a cancelled request are distinct states. This register describes the code’s current outcomes, including paths with little user feedback. It does not promise that every domain has the same error handling.

Failure outcomes

StageTriggerPropagation / visible outcomeRetained state or side effectsSource
API transportNetwork error or aborted fetchfetchRaw returns synthetic status 503; fetchJSON rejects after applicable retry policyNo new successful responseAPIBase.fetchRaw, fetchJSON
API responseNon-OK JSON responseApiError(status, data); JSON parse failure leaves data nullCaller decides how to present the failureAPIBase.fetchJSON
AuthenticationResponse 401Token clearing attempted; response still follows the error pathClearing a cookie alone does not update all context state; server render cookies can be read-onlyAPIBase.fetchRaw, utils/tokens.ts
Search supersededNew non-independent search aborts prior requestSearchService resolves null for the aborted requestThe newer request owns the eventual resultSearchService.fetch
Search disabledRequests disabled before or after fetchPromise rejects; provider catchesPrior response remainsSearchService.disableRequests, fetch
Search providerReal search errorCatch does not expose an error or clear map loading; returns nullPrior saved results remain; no successful save effect to finish loadingSearchProvider.search, MapPageContent.fetchListings
External locationSelected ID has no resolved geometry yetMap effect returns without requesting listingsWaits for locations to change; URL parser removes unsupported resolver IDsMapPageContent, getFiltersFromParams
Saved-search entryBackend returns 404 for searchIdRoute calls notFound()No map initialization from that recordapp/search/[layout]/page.tsx
Saved-search entryOther backend errorRethrown from routeRender fails instead of silently replacing with default filtersSame route
FavoritesFetch/add/delete failsError swallowed; progress flags cleared in finallyExisting favorite list unchangedFavoritesProvider.tsx
Image favoritesRequest failsError swallowed; processing flag clearedCache changes only on successful response conditionsImageFavoritesProvider.tsx
Saved-search creationAPI rejectsBackend info[0].msg or translated fallback shown in snackbarCache updated only on success; processing clearedSaveSearchProvider.create
Profile updateAPI rejectsReturns false and logs the failureStored profile is not replaced by the failed changeUserProvider.update
Session refreshRefresh rejectsLocal logout and browser reloadCookie and stored profile removedUserProvider.refresh, logout
Optional featurePage-level flag is offRelevant route calls notFound()Hiding a menu item is not the only gateDomain app/**/page.tsx files
Raw-response mutationHTTP error returned by fetchRawPromise can resolve; caller must inspect statusFavorite/saved-search deletes and general contact success can diverge from backend persistenceAPI service methods and caller hooks
Listing historyOptional history request failsEmpty history fallback, logging unless abortedDetail retains embedded history; main detail failure still rejectsAPIListingDetails.fetchHistory
Listing pageDetail failsNearby attempt and fallback template; transient metadata adds noindexDoes not establish record deletionListing route and utilities
Dashboard statsTransient versus other API errorTransient rethrown; other errors log and return nullNo universal empty-chart success contractapp/dashboard/_utils.ts
Estimate submissionNo returned estimateFailure snackbar and last data stepResult route is not enteredEstimateProvider.processEstimateData
CMS pageRemote returns no page versus throwsResolver fallback depends on strategy; exceptions propagateLocal metadata can overlay a successful remote pageCmsResolver.getPage
Locations fileMissing file versus invalid JSONMissing logs/empty tree; parsing failure can throwNo runtime rebuild by the loaderLocationsTree/static.ts
Iframe NLPExtraction rejectsNull filters returned, loading clearedPrevious search is not automatically replacedSupportAgent.getNlpFilters
RedisMissing configuration, connection or read failureCache miss/no write from handlerHosting fallback durability is not establishedcache-handler.js

Timeout and retry ownership

LayerBehaviorWhat this does not establish
APIBase timeoutOwn AbortController and apiRequestTimeout, unless caller supplies a signalA caller-supplied signal does not also get this timeout
APIBase server retryRetries 408, 425, 429, 500, 502, 503, 504, 522, 524; attempts bounded by apiRequestRetries; linear delay attempt * apiRetryBackoffBrowser requests are not retried by this loop
SearchServiceAborts its previous non-independent request; independent requests opt outCancellation is not a retry policy
Backend / providerSeparate service behaviorFrontend retries do not prove upstream idempotence or message delivery

The configured retry value is an attempt cap, because the loop starts at attempt 1 and checks attempt < apiRequestRetries. It is not a count of additional attempts after the first one.

Diagnosis order

For a search that never finishes, first distinguish no dispatch (map not loaded or location unresolved) from a failed request caught by SearchProvider. Check the outgoing URL/body and HTTP response before assuming the dataset is empty. For a server render, preserve the status and the thrown ApiError; a static generation failure is different from a rendered empty page.

Do not “fix” these behaviors in a documentation change. Record a separately scoped application issue if a demonstrated outcome needs improvement.

Evidence and limits

Source-read against portal monorepo e30dd9b47, 2026-11-02, from the symbols in the tables. The Search test group executed successfully (10 suites, 99 tests); the existing APIBase tests cover headers, not every retry/error branch listed here. No outage was injected into a live deployment. External provider timing, delivery and deployment caches remain unverified. Coverage.

Last updated on