Login
You're viewing the code4lib.social public feed.
  • Nov 20, 2026, 4:33 PM

    rfc-editor.org/info/rfc9457/

    Today I learned about RFC 9457 (July 2023), which proposes `Content-Type: application/problem+json` - basically if you make an HTTP request and the server returns (say) a 403, it could return a "Problem Details" JSON payload with more information that may be helpful in explaining the 403.

    Having hacked together something like this in a million projects, it's nice to see a standard for it.

    (Obviously users should take care not to leak too much info in their responses.)

    💬 1🔄 0⭐ 0

Replies

  • Nov 20, 2026, 6:10 PM

    @darius HTTP 403 (officially 403 Forbidden) means the server understood your request, but refuses to fulfill it due to insufficient permissions or access restrictions.
    What's more to explain ?

    💬 0🔄 0⭐ 0
  • Nov 20, 2026, 7:16 PM

    @n3 Maybe 403 is a bad example but I picked it specifically because there is an example given in the spec where a user has run out of API credits and the API returns a 403 (maybe you would prefer a different code in this case but I can't imagine this reaching RFC status without significant debate over whether the one substantive example in the spec used a reasonable error code).

    💬 1🔄 0⭐ 0
  • Nov 20, 2026, 7:17 PM

    @n3 also sometimes I would like to know which particular restriction I have run afoul of. There are situations where that is appropriate information to give the requesting entity.

    💬 0🔄 0⭐ 0