Class ProblemHttpException
- Namespace
- BpNexT.Actions.Abstractions
- Assembly
- BpNexT.Actions.Abstractions.dll
A deliberate HTTP problem response raised from a module action. Throwing this is a controlled
outcome, not a failure: the runtime records the run as a normal (non-failed) run and does not
raise a failure notification, while the public HTTP API returns an RFC 9457
application/problem+json response with this status, body, and headers. Use it for
expected results like "not found" (404) or "bad request" (400) — a real bug should still throw
an ordinary exception so it surfaces as a failure.
public sealed class ProblemHttpException : Exception, ISerializable
- Inheritance
-
objectProblemHttpException
- Implements
- Inherited Members
-
object.Equals(object)object.GetHashCode()
Constructors
- ProblemHttpException(int, string, string?, string?, Exception?, IReadOnlyDictionary<string, string>?)
Creates a problem response with a numeric status code.
- ProblemHttpException(HttpStatusCode, string, string?, string?, Exception?, IReadOnlyDictionary<string, string>?)
Creates a problem response from an HttpStatusCode.
Properties
- Code
An application-specific machine-readable error code, emitted as a problem extension member.
- Detail
A human-readable explanation specific to this occurrence (RFC 9457
detail).
- Headers
Extra response headers to set on the reply (e.g.
WWW-Authenticateon a 401).
- Status
The HTTP status code (RFC 9457
status).
- Title
A short, human-readable summary (RFC 9457
title).