md_doc_statuscodes.html 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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.13"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>GRPC Core: Status codes and their use in gRPC</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 Core
  25. &#160;<span id="projectnumber">6.0.0</span>
  26. </div>
  27. </td>
  28. </tr>
  29. </tbody>
  30. </table>
  31. </div>
  32. <!-- end header part -->
  33. <!-- Generated by Doxygen 1.8.13 -->
  34. <script type="text/javascript">
  35. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  36. </script>
  37. <script type="text/javascript" src="menudata.js"></script>
  38. <script type="text/javascript" src="menu.js"></script>
  39. <script type="text/javascript">
  40. $(function() {
  41. initMenu('',true,false,'search.php','Search');
  42. $(document).ready(function() { init_search(); });
  43. });
  44. </script>
  45. <div id="main-nav"></div>
  46. <!-- window showing the filter options -->
  47. <div id="MSearchSelectWindow"
  48. onmouseover="return searchBox.OnSearchSelectShow()"
  49. onmouseout="return searchBox.OnSearchSelectHide()"
  50. onkeydown="return searchBox.OnSearchSelectKey(event)">
  51. </div>
  52. <!-- iframe showing the search results (closed by default) -->
  53. <div id="MSearchResultsWindow">
  54. <iframe src="javascript:void(0)" frameborder="0"
  55. name="MSearchResults" id="MSearchResults">
  56. </iframe>
  57. </div>
  58. </div><!-- top -->
  59. <div class="header">
  60. <div class="headertitle">
  61. <div class="title">Status codes and their use in gRPC </div> </div>
  62. </div><!--header-->
  63. <div class="contents">
  64. <div class="textblock"><p>gRPC uses a set of well defined status codes as part of the RPC API. All RPCs started at a client return a <code>status</code> object composed of an integer <code>code</code> and a string <code>message</code>. The server-side can choose the status it returns for a given RPC.</p>
  65. <p>The gRPC client and server-side implementations may also generate and return <code>status</code> on their own when errors happen. Only a subset of the pre-defined status codes are generated by the gRPC libraries. This allows applications to be sure that any other code it sees was actually returned by the application (although it is also possible for the server-side to return one of the codes generated by the gRPC libraries).</p>
  66. <p>The following table lists the codes that may be returned by the gRPC libraries (on either the client-side or server-side) and summarizes the situations in which they are generated.</p>
  67. <table class="doxtable">
  68. <tr>
  69. <th>Case </th><th align="left">Code </th><th align="center">Generated at Client or Server </th></tr>
  70. <tr>
  71. <td>Client Application cancelled the request </td><td align="left">CANCELLED </td><td align="center">Both </td></tr>
  72. <tr>
  73. <td>Deadline expires before server returns status </td><td align="left">DEADLINE_EXCEEDED </td><td align="center">Both </td></tr>
  74. <tr>
  75. <td>Method not found at server </td><td align="left">UNIMPLEMENTED </td><td align="center">Server </td></tr>
  76. <tr>
  77. <td>Server shutting down </td><td align="left">UNAVAILABLE </td><td align="center">Server </td></tr>
  78. <tr>
  79. <td>Server side application throws an exception (or does something other than returning a Status code to terminate an RPC) </td><td align="left">UNKNOWN </td><td align="center">Server </td></tr>
  80. <tr>
  81. <td>No response received before Deadline expires. This may occur either when the client is unable to send the request to the server or when the server fails to respond in time. </td><td align="left">DEADLINE_EXCEEDED </td><td align="center">Both </td></tr>
  82. <tr>
  83. <td>Some data transmitted (e.g., request metadata written to TCP connection) before connection breaks </td><td align="left">UNAVAILABLE </td><td align="center">Client </td></tr>
  84. <tr>
  85. <td>Could not decompress, but compression algorithm supported (Client -&gt; Server) </td><td align="left">INTERNAL </td><td align="center">Server </td></tr>
  86. <tr>
  87. <td>Could not decompress, but compression algorithm supported (Server -&gt; Client) </td><td align="left">INTERNAL </td><td align="center">Client </td></tr>
  88. <tr>
  89. <td>Compression mechanism used by client not supported at server </td><td align="left">UNIMPLEMENTED </td><td align="center">Server </td></tr>
  90. <tr>
  91. <td>Server temporarily out of resources (e.g., Flow-control resource limits reached) </td><td align="left">RESOURCE_EXHAUSTED </td><td align="center">Server </td></tr>
  92. <tr>
  93. <td>Client does not have enough memory to hold the server response </td><td align="left">RESOURCE_EXHAUSTED </td><td align="center">Client </td></tr>
  94. <tr>
  95. <td>Flow-control protocol violation </td><td align="left">INTERNAL </td><td align="center">Both </td></tr>
  96. <tr>
  97. <td>Error parsing returned status </td><td align="left">UNKNOWN </td><td align="center">Client </td></tr>
  98. <tr>
  99. <td>Incorrect Auth metadata ( Credentials failed to get metadata, Incompatible credentials set on channel and call, Invalid host set in <code>:authority</code> metadata, etc.) </td><td align="left">UNAUTHENTICATED </td><td align="center">Both </td></tr>
  100. <tr>
  101. <td>Request cardinality violation (method requires exactly one request but client sent some other number of requests) </td><td align="left">UNIMPLEMENTED </td><td align="center">Server </td></tr>
  102. <tr>
  103. <td>Response cardinality violation (method requires exactly one response but server sent some other number of responses) </td><td align="left">UNIMPLEMENTED </td><td align="center">Client </td></tr>
  104. <tr>
  105. <td>Error parsing response proto </td><td align="left">INTERNAL </td><td align="center">Client </td></tr>
  106. <tr>
  107. <td>Error parsing request proto </td><td align="left">INTERNAL </td><td align="center">Server </td></tr>
  108. <tr>
  109. <td>Sent or received message was larger than configured limit </td><td align="left">RESOURCE_EXHAUSTED </td><td align="center">Both </td></tr>
  110. </table>
  111. <p>The following status codes are never generated by the library:</p><ul>
  112. <li>INVALID_ARGUMENT</li>
  113. <li>NOT_FOUND</li>
  114. <li>ALREADY_EXISTS</li>
  115. <li>FAILED_PRECONDITION</li>
  116. <li>ABORTED</li>
  117. <li>OUT_OF_RANGE</li>
  118. <li>DATA_LOSS </li>
  119. </ul>
  120. </div></div><!-- contents -->
  121. <!-- start footer part -->
  122. <hr class="footer"/><address class="footer"><small>
  123. Generated on Fri Apr 13 2018 15:03:52 for GRPC Core by &#160;<a href="http://www.doxygen.org/index.html">
  124. <img class="footer" src="doxygen.png" alt="doxygen"/>
  125. </a> 1.8.13
  126. </small></address>
  127. </body>
  128. </html>