You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "pjfanning (via GitHub)" <gi...@apache.org> on 2023/08/09 21:26:20 UTC

[GitHub] [incubator-pekko-http] pjfanning commented on a diff in pull request #87: Update naming for status codes 413 and 422

pjfanning commented on code in PR #87:
URL: https://github.com/apache/incubator-pekko-http/pull/87#discussion_r1289215952


##########
http-core/src/main/scala/org/apache/pekko/http/scaladsl/model/StatusCode.scala:
##########
@@ -151,8 +151,10 @@ object StatusCodes extends ObjectRegistry[Int, StatusCode] {
   val Gone                         = reg(c(410)("Gone", "The resource requested is no longer available and will not be available again."))
   val LengthRequired               = reg(c(411)("Length Required", "The request did not specify the length of its content, which is required by the requested resource."))
   val PreconditionFailed           = reg(c(412)("Precondition Failed", "The server does not meet one of the preconditions that the requester put on the request."))
+  val ContentTooLarge              = reg(c(413)("Content Too Large", "The request content is larger than the server is willing or able to process."))
+  @deprecated("deprecated in favor of ContentTooLarge", "1.0.0")
   val PayloadTooLarge              = reg(c(413)("Payload Too Large", "The request payload is larger than the server is willing or able to process."))
-  @deprecated("deprecated in favor of PayloadTooLarge", "Akka HTTP 10.1.11")
+  @deprecated("deprecated in favor of ContentTooLarge", "1.0.0")
   val RequestEntityTooLarge        = PayloadTooLarge

Review Comment:
   can you change this to this
   ```
   @deprecated("deprecated in favor of PayloadTooLarge, which was later deprecated in favor of ContentTooLarge (please switch to ContentTooLarge)", "Akka HTTP 10.1.11")
   ```
   
   
   * can you a comment - `// RequestEntityTooLarge was originally deprecated in favour of PayloadTooLarge in Akka HTTP 10.1.11` ?
   * This will remind us that this line can actually be removed soon - possibly in Pekko 1.1.0 - because this line was already deprecated - but it does make sense to adjust the deprecation message now
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org