---
title: Business rules
summary: Rules enforced around the call to the remote service.
status: draft
owner: SAIF.Core documentation
last_reviewed: 2026-09-24
---

# Business rules

The only call site enforces a single client-side default: it labels every logged error with a fixed environment name regardless of which deployment track actually produced it.

---

## BR-LOG-001 Environment is hard-coded to NetProd

| Field | Value |
| --- | --- |
| Statement | `SAIFExceptionLogger.Log` always sets `ApplicationExceptionDetail.Environment = "NetProd"` before calling `WriteError`, regardless of the deployment track the code is actually running on |
| Trigger | Evaluated whenever `SAIFExceptionLogger.Log` builds the `ApplicationExceptionDetail` for a caught Web API exception |
| Enforcement | Call site — `SAIFExceptionLogger.cs:23` |
| Origin | call site |
| Outcome | Every error record sent to `WSLogging` from `EnvironmentApi`, in every deployment track, is tagged `NetProd`, so the `Environment` field cannot be used to distinguish which track produced the error |
| Related operation | [`WriteError`](reference.md#writeerror) |
| Reached from | [`WriteError`](reference.md#writeerror) via `SAIFExceptionLogger.Log` (`Services/SAIF.Services.WebApi/EnvironmentApi/App_Start/SAIFExceptionLogger.cs:33`) |
| Source | `Services/SAIF.Services.WebApi/EnvironmentApi/App_Start/SAIFExceptionLogger.cs:23` |

---

## Related documentation
- [Client index](index.md)
- [Overview](overview.md)
- [Architecture](architecture.md)
- [Contract](contract.md)
- [Operation map](operation-map.md)
- [Client reference](reference.md)
- [Consumption](consumption.md)
- [Dependencies](dependencies.md)
- [Tech debt](tech-debt.md)

## Sources
- `Services/SAIF.Services.WebApi/EnvironmentApi/App_Start/SAIFExceptionLogger.cs`
