md_doc_http-grpc-status-mapping.html 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.17"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>GRPC PHP: HTTP to gRPC Status Code Mapping</title>
  9. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  13. <script type="text/javascript" src="search/searchdata.js"></script>
  14. <script type="text/javascript" src="search/search.js"></script>
  15. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  19. <div id="titlearea">
  20. <table cellspacing="0" cellpadding="0">
  21. <tbody>
  22. <tr style="height: 56px;">
  23. <td id="projectalign" style="padding-left: 0.5em;">
  24. <div id="projectname">GRPC PHP
  25. &#160;<span id="projectnumber">1.36.1</span>
  26. </div>
  27. </td>
  28. </tr>
  29. </tbody>
  30. </table>
  31. </div>
  32. <!-- end header part -->
  33. <!-- Generated by Doxygen 1.8.17 -->
  34. <script type="text/javascript">
  35. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  36. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  37. /* @license-end */
  38. </script>
  39. <script type="text/javascript" src="menudata.js"></script>
  40. <script type="text/javascript" src="menu.js"></script>
  41. <script type="text/javascript">
  42. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  43. $(function() {
  44. initMenu('',true,false,'search.php','Search');
  45. $(document).ready(function() { init_search(); });
  46. });
  47. /* @license-end */</script>
  48. <div id="main-nav"></div>
  49. <!-- window showing the filter options -->
  50. <div id="MSearchSelectWindow"
  51. onmouseover="return searchBox.OnSearchSelectShow()"
  52. onmouseout="return searchBox.OnSearchSelectHide()"
  53. onkeydown="return searchBox.OnSearchSelectKey(event)">
  54. </div>
  55. <!-- iframe showing the search results (closed by default) -->
  56. <div id="MSearchResultsWindow">
  57. <iframe src="javascript:void(0)" frameborder="0"
  58. name="MSearchResults" id="MSearchResults">
  59. </iframe>
  60. </div>
  61. </div><!-- top -->
  62. <div class="PageDoc"><div class="header">
  63. <div class="headertitle">
  64. <div class="title">HTTP to gRPC Status Code Mapping </div> </div>
  65. </div><!--header-->
  66. <div class="contents">
  67. <div class="textblock"><p>Since intermediaries are a common part of HTTP infrastructure some responses to gRPC requests may be received that do not include the grpc-status header. In some cases mapping error codes from an intermediary allows the gRPC client to behave more appropriately to the error situation without overloading the semantics of either error code.</p>
  68. <p>This table is to be used <em>only</em> for clients that received a response that did not include grpc-status. If grpc-status was provided, it <em>must</em> be used. Servers <em>must not</em> use this table to determine an HTTP status code to use; the mappings are neither symmetric nor 1-to-1.</p>
  69. <table class="markdownTable">
  70. <tr class="markdownTableHead">
  71. <th class="markdownTableHeadNone">HTTP Status Code </th><th class="markdownTableHeadNone">gRPC Status Code </th></tr>
  72. <tr class="markdownTableRowOdd">
  73. <td class="markdownTableBodyNone">400 Bad Request </td><td class="markdownTableBodyNone">INTERNAL </td></tr>
  74. <tr class="markdownTableRowEven">
  75. <td class="markdownTableBodyNone">401 Unauthorized </td><td class="markdownTableBodyNone">UNAUTHENTICATED </td></tr>
  76. <tr class="markdownTableRowOdd">
  77. <td class="markdownTableBodyNone">403 Forbidden </td><td class="markdownTableBodyNone">PERMISSION_DENIED </td></tr>
  78. <tr class="markdownTableRowEven">
  79. <td class="markdownTableBodyNone">404 Not Found </td><td class="markdownTableBodyNone">UNIMPLEMENTED </td></tr>
  80. <tr class="markdownTableRowOdd">
  81. <td class="markdownTableBodyNone">429 Too Many Requests </td><td class="markdownTableBodyNone">UNAVAILABLE </td></tr>
  82. <tr class="markdownTableRowEven">
  83. <td class="markdownTableBodyNone">502 Bad Gateway </td><td class="markdownTableBodyNone">UNAVAILABLE </td></tr>
  84. <tr class="markdownTableRowOdd">
  85. <td class="markdownTableBodyNone">503 Service Unavailable </td><td class="markdownTableBodyNone">UNAVAILABLE </td></tr>
  86. <tr class="markdownTableRowEven">
  87. <td class="markdownTableBodyNone">504 Gateway Timeout </td><td class="markdownTableBodyNone">UNAVAILABLE </td></tr>
  88. <tr class="markdownTableRowOdd">
  89. <td class="markdownTableBodyNone"><em>All other codes</em> </td><td class="markdownTableBodyNone">UNKNOWN </td></tr>
  90. </table>
  91. <p>Technically, 1xx should have the entire header skipped and a subsequent header be read. See RFC 7540 §8.1.</p>
  92. <p>200 is UNKNOWN because there should be a grpc-status in case of truly OK response. </p>
  93. </div></div><!-- contents -->
  94. </div><!-- PageDoc -->
  95. <!-- start footer part -->
  96. <hr class="footer"/><address class="footer"><small>
  97. Generated on Wed Mar 3 2021 19:20:17 for GRPC PHP by &#160;<a href="http://www.doxygen.org/index.html">
  98. <img class="footer" src="doxygen.png" alt="doxygen"/>
  99. </a> 1.8.17
  100. </small></address>
  101. </body>
  102. </html>