Status code · Server

BadUnexpectedError

BadServer fault

BadUnexpectedError is the server saying something went wrong that it could not classify. It carries no diagnostic value on its own, so the work is entirely in correlating it with the server log and reducing the trigger to a minimal reproducible request.

Defined behaviour: An unexpected error occurred. (our description of the condition this code reports)

What you actually see

An operation fails with a status that says nothing specific, sometimes intermittently, and the client has no additional information to act on.

Why it happens

  • An unclassified fault inside the serverWhere a server catches an error it has no specific code for, this is the fallback. It tells you the failure was server-side and nothing more, which is why the log on the server host is the only useful next step.
  • A transient fault under load or during a state changeFailures that appear during startup, shutdown, failover or a configuration reload often surface this way and then stop. Correlating the timestamps with server lifecycle events usually explains them.
  • A malformed or unexpected message the server could not attributeA decoding problem, a truncated chunk or a message that arrives outside the expected sequence can be reported generically rather than as a specific decoding or channel error.
  • An error mapped from a lower layerServers that wrap a device driver, a database or an operating-system call sometimes translate an unrecognised return value into this code, losing the original detail at the boundary.
  • A defect that a more specific code would have describedSome products under-classify. Where a more precise code exists in the specification, receiving this one is itself worth reporting, because a specific code would have made the problem diagnosable from the client.

How to fix it

In diagnostic order: work down, do not skip ahead.

  1. Get the server log for the exact timestampThis code is not actionable from the client side. Note the UTC time of the failure and pull the server log around it; that is where the real error lives.
  2. Determine whether it is reproducibleRepeat the same operation several times. A deterministic failure points at a request-specific defect; an intermittent one points at load, lifecycle or network conditions and should be correlated with server restarts and traffic peaks.
  3. Capture the exchange on the wireTake a Wireshark capture with the OPC UA dissector around the failure. It shows whether the request left the client intact and whether the response is a service fault or an operation-level status.
  4. Check the health of the whole pathLook for a restarting server process, a failing over redundant pair, a saturated link or an intervening proxy. Generic errors clustered in time usually have an environmental cause.
  5. Escalate with evidence and version detailProvide the vendor with the reproducer, the capture, the server log extract and the BuildInfo values, and ask specifically whether a more precise StatusCode should have been returned.

Where it shows up, by tool and stack

Tool / stackWhat to do there
opcua-commanderReproducing from a second independent client separates a defect in your client from a fault in the server, which is the first question a vendor will ask.
UaExpertReproduce in UaExpert to remove your client from the equation. Its log pane records the response status per operation and timestamps it for correlation.
UA-.NETStandard (C#)Enable stack tracing on both client and server around the failure window. The server trace usually contains the original exception the generic code replaced.
open62541 (C)Raise the log level on the server and reproduce. Generic errors on this stack frequently accompany a specific message that names the failing internal call.
IgnitionClusters of unclassified errors on a gateway connection usually track the server process restarting rather than anything in the gateway. Check server uptime and restart counts before treating it as an application defect.
ProsysWhere you have a simulation server available, running the same sequence against it establishes quickly whether the client sequence itself is legal.

What it looks like in the log

Operation failed with BadUnexpectedError; no further diagnostic available
Server restart detected at 03:14:07Z; client operations failed in the preceding second
Unclassified server fault while processing request

Confirm the fix

Once the underlying cause is addressed, run the failing sequence continuously for a period that would previously have shown several occurrences and confirm none appear in either the client or the server log.

Stop it happening again

Log every non-good StatusCode with its timestamp, service and NodeId on the client, keep server logs on the same time source, and treat any occurrence of this code as an incident to investigate rather than a retryable blip.

Stuck on more than one of these? The troubleshooting clinic works through broken configurations end to end, on camera.

Troubleshooting clinic →

Last verified 7 September 2026 against OPC UA 1.05.07. OPC UA Connect is an educational resource and is not affiliated with the OPC Foundation.

Free download
OPC UA Status Code Diagnostic Tree
A 15-page diagnostic reference grouping every normative status code by what actually went wrong: with the first action for each, and the four questions that resolve most faults before you read a single code.
Get the free diagnostic tree →
Free, no course, no login