Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace existing HTTP Status Code 425 with TOO_EARLY #2255

Merged
merged 2 commits into from
Oct 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,14 @@ private StatusCodes() {}
public static final StatusCode UNPROCESSABLE_ENTITY = akka.http.scaladsl.model.StatusCodes.UnprocessableEntity();
public static final StatusCode LOCKED = akka.http.scaladsl.model.StatusCodes.Locked();
public static final StatusCode FAILED_DEPENDENCY = akka.http.scaladsl.model.StatusCodes.FailedDependency();

/**
* @deprecated Non-standard Unordered Collection should not be used, deprecated in favor of Too Early
*/
@Deprecated
public static final StatusCode UNORDERED_COLLECTION = akka.http.scaladsl.model.StatusCodes.UnorderedCollection();

public static final StatusCode TOO_EARLY = akka.http.scaladsl.model.StatusCodes.TooEarly();
public static final StatusCode UPGRADE_REQUIRED = akka.http.scaladsl.model.StatusCodes.UpgradeRequired();
public static final StatusCode PRECONDITION_REQUIRED = akka.http.scaladsl.model.StatusCodes.PreconditionRequired();
public static final StatusCode TOO_MANY_REQUESTS = akka.http.scaladsl.model.StatusCodes.TooManyRequests();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,11 @@ object StatusCodes extends ObjectRegistry[Int, StatusCode] {
val UnprocessableEntity = reg(c(422)("Unprocessable Entity", "The request was well-formed but was unable to be followed due to semantic errors."))
val Locked = reg(c(423)("Locked", "The resource that is being accessed is locked."))
val FailedDependency = reg(c(424)("Failed Dependency", "The request failed due to failure of a previous request."))
val UnorderedCollection = reg(c(425)("Unordered Collection", "The collection is unordered."))

@deprecated("Non-standard Unordered Collection should not be used, deprecated in favor of Too Early", "10.1.6")
val UnorderedCollection = TooEarly

val TooEarly = reg(c(425)("Too Early", "The server is unwilling to risk processing a request that might be replayed.")) // RFC 8470
val UpgradeRequired = reg(c(426)("Upgrade Required", "The client should switch to a different protocol."))
val PreconditionRequired = reg(c(428)("Precondition Required", "The server requires the request to be conditional."))
val TooManyRequests = reg(c(429)("Too Many Requests", "The user has sent too many requests in a given amount of time."))
Expand Down