V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
flmn
V2EX  ›  程序员

HTTP API 的错误响应标准

  •  1
     
  •   flmn · 127 天前 · 986 次点击
    这是一个创建于 127 天前的主题,其中的信息可能已经有所发展或是发生改变。

    针对 HTTP API 调用,如果发生了错误,应该怎样返回错误信息呢?这是很多进行 API 设计的人都会面临的问题,其实 IANA 已经定义了标准,就是 RFC 9457:Problem Details for HTTP APIs

    这篇文章介绍了 RFC 9457: https://www.jitao.tech/posts/problem-details-for-http-apis

    1 条回复    2024-01-03 15:10:23 +08:00
    vczyh
        1
    vczyh  
       127 天前
    不错
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2584 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 15:57 · PVG 23:57 · LAX 08:57 · JFK 11:57
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.