Table of Contents

Class HttpProblem

Namespace
BpNexT.Actions.Abstractions
Assembly
BpNexT.Actions.Abstractions.dll

Factory for ProblemHttpException — the ergonomic way to return an HTTP problem from module code (throw HttpProblem.NotFound("…")). Named helpers cover the common statuses; Create(int, string, string?, string?, Exception?, IReadOnlyDictionary<string, string>?) handles the rest.

public static class HttpProblem
Inheritance
object
HttpProblem
Inherited Members
object.Equals(object)
object.GetHashCode()
object.ToString()

Methods

BadGateway(string, string?, string?, Exception?)

502: an upstream system answered with an error.

BadRequest(string, string?, string?, Exception?)

400: the request itself is wrong (missing or invalid values).

Conflict(string, string?, string?, Exception?)

409: the request conflicts with the current state (duplicates, concurrent edits).

Create(int, string, string?, string?, Exception?, IReadOnlyDictionary<string, string>?)

Creates a problem with any status code.

Create(HttpStatusCode, string, string?, string?, Exception?, IReadOnlyDictionary<string, string>?)

Creates a problem from an HttpStatusCode.

FailedDependency(string, string?, string?, Exception?)

The request failed because a dependency it needed failed — most often because there is no active microtech ERP login for an action that requires one.

InternalServerError(string, string?, string?, Exception?)

500: an unexpected condition the caller cannot fix.

NotFound(string, string?, string?, Exception?)

404: the addressed resource does not exist.

ServiceUnavailable(string, string?, string?, Exception?)

503: the service is temporarily unable to answer; retry later.

Unauthorized(string, string?, string?, string, Exception?)

401: authentication is missing or invalid; sets WWW-Authenticate.