What is the origin of HTTP status 501?

93 views
Skip to first unread message

miqui

unread,
Oct 27, 2020, 5:02:06 PM10/27/20
to API Craft
Hi folks,

..is anyone who is designing+writing APIs using this status code?   i would like to know what is the origin of this status code or at least why was it proposed/intended purpose

..i think the language in the RFC might be misinterpreted as a client error

..thanks for your feedback

rgds,
Miguel

Hassan Schroeder

unread,
Oct 27, 2020, 5:26:00 PM10/27/20
to api-...@googlegroups.com
On Tue, Oct 27, 2020 at 2:02 PM miqui <migm...@gmail.com> wrote:

> ..is anyone who is designing+writing APIs using this status code? i would like to know what is the origin of this status code or at least why was it proposed/intended purpose
>
> ..i think the language in the RFC might be misinterpreted as a client error

?? https://tools.ietf.org/html/rfc7231#section-6.6.2 does not seem at
all ambiguous to me; can you elaborate?

--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote

miqui

unread,
Oct 28, 2020, 10:08:46 AM10/28/20
to API Craft
hi Hassan,

..thanks for your feedback....to answer your inquiry:  i have some developers using this to "say"/mean :  "hey, consumer, i have this request and for now it returns a resource that is 80% complete, but later i am going to add more to achieve 100% of what the business wants".....  so they return 501 


so, well, IMHO, it would not do that and instead say return 400 with the proper response msg "hey, sorry, i don't support what you are trying to do with this request"
...simple

..it gets worst when people think they can elicit certain "retry" behavior from their consumers.

rgds,
Miguel

Carl Zetie

unread,
Oct 28, 2020, 10:49:52 AM10/28/20
to API Craft
I'm with Hassan. I don't understand how anybody can read the RFC and get that meaning from it. 501 indicates that the server does not support that request at all. For example, some parts of an API might be optionally implemented, and if a server does not support a particular option, 501 is appropriate. 

Isn't the situation that they are describing covered by return 202, "Accepted" (https://tools.ietf.org/html/rfc7231#section-6.3.3)?

--CZ

Carlos Eberhardt

unread,
Oct 28, 2020, 10:55:47 AM10/28/20
to api-...@googlegroups.com
As I read the RFC, this is definitely not a 501 case.

..thanks for your feedback....to answer your inquiry:  i have some developers using this to "say"/mean :  "hey, consumer, i have this request and for now it returns a resource that is 80% complete, but later i am going to add more to achieve 100% of what the business wants".....  so they return 501 

In my opinion, the most important part of the description for 501 is the second sentence. 501 is for when your server doesn't understand the HTTP method sent. Unlike a 405, where the server does understand the http method, but it's inappropriate for the resource.

   The 501 (Not Implemented) status code indicates that the server does
   not support the functionality required to fulfill the request.  This
   is the appropriate response when the server does not recognize the
   request method and is not capable of supporting it for any resource.



--
You received this message because you are subscribed to the Google Groups "API Craft" group.
To unsubscribe from this group and stop receiving emails from it, send an email to api-craft+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/api-craft/bde13f9e-fa17-4494-9c68-7b756e1442f1n%40googlegroups.com.

miqui

unread,
Nov 3, 2020, 1:37:23 PM11/3/20
to API Craft
..thanks for the feedback... i am now looking at this: https://www.bennadel.com/blog/2434-http-status-codes-for-invalid-data-400-vs-422.htm 

..perhaps it is better suited (even though i am hijacking a webdav extension to try to make sense of things..)

rgds,
Miguel

Kyle O'Brien

unread,
Nov 4, 2020, 8:55:58 PM11/4/20
to API Craft
Could you share more about your use-case? 422 sounds like what you're looking for if I had to guess, IE if your API is expecting to receive formdata but it's sent as XML or JSON.
Reply all
Reply to author
Forward
0 new messages