Update content of files

This commit is contained in:
GitHub Action 2022-09-13 15:57:04 +00:00
parent befc05d130
commit fa4f3753ec
7 changed files with 53 additions and 4 deletions

View file

@ -42,14 +42,14 @@
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/errors" >Error handling </a></li></ul></div> <div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/errors" >Error handling </a></li></ul></div>
<h1 id="dev_page_title">Error handling </h1> <h1 id="dev_page_title">Error handling </h1>
<div id="dev_page_content"><p>There will be errors when working with the API, and they must be correctly handled on the client.</p> <div id="dev_page_content"><p>There will be errors when working with the API, and they must be correctly handled on the client.<br>
<p>An error is characterized by several parameters:</p> An error is characterized by several parameters:</p>
<h4><a class="anchor" href="#error-code" id="error-code" name="error-code"><i class="anchor-icon"></i></a>Error Code</h4> <h4><a class="anchor" href="#error-code" id="error-code" name="error-code"><i class="anchor-icon"></i></a>Error Code</h4>
<p>Numerical value similar to HTTP status. Contains information on the type of error that occurred: for example, a data input error, privacy error, or server error. This is a required parameter.</p> <p>Numerical value similar to HTTP status. Contains information on the type of error that occurred: for example, a data input error, privacy error, or server error. This is a required parameter.</p>
<h4><a class="anchor" href="#error-type" id="error-type" name="error-type"><i class="anchor-icon"></i></a>Error Type</h4> <h4><a class="anchor" href="#error-type" id="error-type" name="error-type"><i class="anchor-icon"></i></a>Error Type</h4>
<p>A string literal in the form of <code>/[A-Z_0-9]+/</code>, which summarizes the problem. For example, <code>AUTH_KEY_UNREGISTERED</code>. This is an optional parameter.</p> <p>A string literal in the form of <code>/[A-Z_0-9]+/</code>, which summarizes the problem. For example, <code>AUTH_KEY_UNREGISTERED</code>. This is an optional parameter.</p>
<h4><a class="anchor" href="#error-database" id="error-database" name="error-database"><i class="anchor-icon"></i></a>Error Database</h4> <h4><a class="anchor" href="#error-database" id="error-database" name="error-database"><i class="anchor-icon"></i></a>Error Database</h4>
<p>A full machine-readable JSON list of RPC errors that can be returned by all methods in the API can be found <a href="/file/464001219/106c5/hD5w1XYEfUU.86480.json/66be96977e2052b519">here »</a>, what follows is a description of its fields: </p> <p>A full machine-readable JSON list of RPC errors that can be returned by all methods in the API can be found <a href="/file/464001333/10e35/1f1mdvegF0A.86679.json/3dca01fbfff6d1e80f">here »</a>, what follows is a description of its fields: </p>
<ul> <ul>
<li><code>errors</code> - All error messages and codes for each method (object).<ul> <li><code>errors</code> - All error messages and codes for each method (object).<ul>
<li>Keys: Error codes as strings (numeric strings)</li> <li>Keys: Error codes as strings (numeric strings)</li>

View file

@ -48,6 +48,7 @@
<h3><a class="anchor" href="#layer-144" id="layer-144" name="layer-144"><i class="anchor-icon"></i></a><a href="/schema?layer=144">Layer 144</a></h3> <h3><a class="anchor" href="#layer-144" id="layer-144" name="layer-144"><i class="anchor-icon"></i></a><a href="/schema?layer=144">Layer 144</a></h3>
<p>Users can now send <a href="/api/custom-emoji">custom emojis</a>, <a href="/api/premium#gifting-telegram-premium">gift Telegram Premium</a> to other users, and <a href="/constructor/inputWebFileAudioAlbumThumbLocation">download album covers for any music file</a>.<br> <p>Users can now send <a href="/api/custom-emoji">custom emojis</a>, <a href="/api/premium#gifting-telegram-premium">gift Telegram Premium</a> to other users, and <a href="/constructor/inputWebFileAudioAlbumThumbLocation">download album covers for any music file</a>.<br>
Also introducing new <a href="https://telegram.org/blog/custom-emoji#privacy-settings-for-voice-messages">voice message privacy settings</a> and support for additional <a href="/api/payments">payment methods</a>.</p> Also introducing new <a href="https://telegram.org/blog/custom-emoji#privacy-settings-for-voice-messages">voice message privacy settings</a> and support for additional <a href="/api/payments">payment methods</a>.</p>
<p>The <a href="/schema/end-to-end">E2E schema</a> was updated to account for previous changes in the main schema (<a href="/api/custom-emoji">custom emojis</a>+<a href="/api/entities">spoiler entities</a>).</p>
<p>Added the following brand new documentation articles:</p> <p>Added the following brand new documentation articles:</p>
<ul> <ul>
<li><a href="/api/links">Deep links</a></li> <li><a href="/api/links">Deep links</a></li>
@ -56,7 +57,6 @@ Also introducing new <a href="https://telegram.org/blog/custom-emoji#privacy-set
<li><a href="/api/wallpapers">Wallpapers</a></li> <li><a href="/api/wallpapers">Wallpapers</a></li>
</ul> </ul>
<p>Also added more details on <a href="/api/entities#entity-length">entity length calculation</a> and <a href="/api/errors#406-not-acceptable"><code>AUTH_KEY_DUPLICATED</code> errors</a>.</p> <p>Also added more details on <a href="/api/entities#entity-length">entity length calculation</a> and <a href="/api/errors#406-not-acceptable"><code>AUTH_KEY_DUPLICATED</code> errors</a>.</p>
<p>The <a href="/schema/end-to-end">E2E schema</a> was also updated to account for previous changes in the main schema (<a href="/api/custom-emoji">custom emojis</a>+<a href="/api/entities">spoiler entities</a>).</p>
<p>The <a href="/api/errors#error-database">RPC error database »</a> was also updated.</p> <p>The <a href="/api/errors#error-database">RPC error database »</a> was also updated.</p>
<h4><a class="anchor" href="#schema-changes" id="schema-changes" name="schema-changes"><i class="anchor-icon"></i></a>Schema changes</h4> <h4><a class="anchor" href="#schema-changes" id="schema-changes" name="schema-changes"><i class="anchor-icon"></i></a>Schema changes</h4>
<h5><a class="anchor" href="#new-methods" id="new-methods" name="new-methods"><i class="anchor-icon"></i></a>New Methods</h5> <h5><a class="anchor" href="#new-methods" id="new-methods" name="new-methods"><i class="anchor-icon"></i></a>New Methods</h5>

View file

@ -64,6 +64,23 @@
<p>This constructor does not require any parameters.</p> <p>This constructor does not require any parameters.</p>
<h3><a class="anchor" href="#result" id="result" name="result"><i class="anchor-icon"></i></a>Result</h3> <h3><a class="anchor" href="#result" id="result" name="result"><i class="anchor-icon"></i></a>Result</h3>
<p><a href="/type/account.ResetPasswordResult">account.ResetPasswordResult</a></p> <p><a href="/type/account.ResetPasswordResult">account.ResetPasswordResult</a></p>
<h3><a class="anchor" href="#possible-errors" id="possible-errors" name="possible-errors"><i class="anchor-icon"></i></a>Possible errors</h3>
<table class="table">
<thead>
<tr>
<th>Code</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>400</td>
<td>PASSWORD_EMPTY</td>
<td>The provided password is empty.</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3> <h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#two-factor-authentication" id="two-factor-authentication" name="two-factor-authentication"><i class="anchor-icon"></i></a><a href="/api/srp">Two-factor authentication</a></h4> <h4><a class="anchor" href="#two-factor-authentication" id="two-factor-authentication" name="two-factor-authentication"><i class="anchor-icon"></i></a><a href="/api/srp">Two-factor authentication</a></h4>
<p>How to login to a user's account if they have enabled 2FA, how to change password.</p></div> <p>How to login to a user's account if they have enabled 2FA, how to change password.</p></div>

View file

@ -83,6 +83,23 @@
</table> </table>
<h3><a class="anchor" href="#result" id="result" name="result"><i class="anchor-icon"></i></a>Result</h3> <h3><a class="anchor" href="#result" id="result" name="result"><i class="anchor-icon"></i></a>Result</h3>
<p><a href="/type/Bool">Bool</a></p> <p><a href="/type/Bool">Bool</a></p>
<h3><a class="anchor" href="#possible-errors" id="possible-errors" name="possible-errors"><i class="anchor-icon"></i></a>Possible errors</h3>
<table class="table">
<thead>
<tr>
<th>Code</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>400</td>
<td>LANG_CODE_INVALID</td>
<td>The specified language code is invalid.</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#bots-can-use-this-method" id="bots-can-use-this-method" name="bots-can-use-this-method"><i class="anchor-icon"></i></a>Bots can use this method</h3></div> <h3><a class="anchor" href="#bots-can-use-this-method" id="bots-can-use-this-method" name="bots-can-use-this-method"><i class="anchor-icon"></i></a>Bots can use this method</h3></div>
</div> </div>

View file

@ -113,6 +113,11 @@
<td>LANG_CODE_INVALID</td> <td>LANG_CODE_INVALID</td>
<td>The specified language code is invalid.</td> <td>The specified language code is invalid.</td>
</tr> </tr>
<tr>
<td>400</td>
<td>USER_BOT_REQUIRED</td>
<td>This method can only be called by a bot.</td>
</tr>
</tbody> </tbody>
</table> </table>
<h3><a class="anchor" href="#bots-can-use-this-method" id="bots-can-use-this-method" name="bots-can-use-this-method"><i class="anchor-icon"></i></a>Bots can use this method</h3></div> <h3><a class="anchor" href="#bots-can-use-this-method" id="bots-can-use-this-method" name="bots-can-use-this-method"><i class="anchor-icon"></i></a>Bots can use this method</h3></div>

View file

@ -115,6 +115,11 @@
<tbody> <tbody>
<tr> <tr>
<td>400</td> <td>400</td>
<td>INPUT_TEXT_EMPTY</td>
<td>The specified text is empty.</td>
</tr>
<tr>
<td>400</td>
<td>MSG_ID_INVALID</td> <td>MSG_ID_INVALID</td>
<td>Invalid message ID provided.</td> <td>Invalid message ID provided.</td>
</tr> </tr>

View file

@ -131,6 +131,11 @@ Will return a list of <a href="/constructor/message">messages</a> with <code>pee
<td>MESSAGE_ID_INVALID</td> <td>MESSAGE_ID_INVALID</td>
<td>The provided message id is invalid.</td> <td>The provided message id is invalid.</td>
</tr> </tr>
<tr>
<td>400</td>
<td>PEER_ID_INVALID</td>
<td>The provided peer id is invalid.</td>
</tr>
</tbody> </tbody>
</table> </table>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3> <h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>