-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patherrors.md.BMFOxdHK.js
1 lines (1 loc) · 7.44 KB
/
errors.md.BMFOxdHK.js
1
import{_ as e,c as a,o as s,a9 as i}from"./chunks/framework.DgZLXPSQ.js";const k=JSON.parse('{"title":"Errors","description":"","frontmatter":{},"headers":[],"relativePath":"errors.md","filePath":"errors.md"}'),o={name:"errors.md"},n=i('<h1 id="errors" tabindex="-1">Errors <a class="header-anchor" href="#errors" aria-label="Permalink to "Errors""></a></h1><p>You can find Axe API error details on this page.</p><h2 id="unacceptable-version-name" tabindex="-1"><code>UNACCEPTABLE_VERSION_NAME</code> <a class="header-anchor" href="#unacceptable-version-name" aria-label="Permalink to "`UNACCEPTABLE_VERSION_NAME`""></a></h2><p>The version name must be alpha-numeric. The following version names are acceptable;</p><ul><li><code>v1</code></li><li><code>v12</code></li><li><code>beta</code></li><li><code>alfa</code></li></ul><p>The following version names are not acceptable;</p><ul><li><code>v1%</code></li><li><code>v1-</code></li><li><code>v1/</code></li><li><code>v1;</code></li></ul><h2 id="version-config-not-found" tabindex="-1"><code>VERSION_CONFIG_NOT_FOUND</code> <a class="header-anchor" href="#version-config-not-found" aria-label="Permalink to "`VERSION_CONFIG_NOT_FOUND`""></a></h2><p>Each version must have a config file which is called <code>config.ts</code>. For example;</p><p><code>/app/v1/config.ts</code></p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { IVersionConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "axe-api"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>\n<span class="line"></span>\n<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> IVersionConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>\n<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> transaction: [],</span></span>\n<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> serializers: [],</span></span>\n<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> supportedLanguages: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"en-GB"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"en"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"tr"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"de"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">],</span></span>\n<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> defaultLanguage: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"en-GB"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>\n<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">};</span></span>\n<span class="line"></span>\n<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> config;</span></span></code></pre></div><h2 id="table-doesnt-have-any-column" tabindex="-1"><code>TABLE_DOESNT_HAVE_ANY_COLUMN</code> <a class="header-anchor" href="#table-doesnt-have-any-column" aria-label="Permalink to "`TABLE_DOESNT_HAVE_ANY_COLUMN`""></a></h2><p>It means that your model is not relevant to a database table correctly. Axe API uses the plural version of the model name. For example;</p><ul><li><code>User.ts</code> => <code>users</code></li></ul><p>You have to be sure the name that is looking from Axe API and the database table name is the same.</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>You can specify the name in the model definitions; <a href="/learn/models.html">Table Name</a></p></div><h2 id="reserved-version-name" tabindex="-1"><code>RESERVED_VERSION_NAME</code> <a class="header-anchor" href="#reserved-version-name" aria-label="Permalink to "`RESERVED_VERSION_NAME`""></a></h2><p>The following names can not be used as a version names;</p><ul><li><code>Config</code></li><li><code>Events</code></li><li><code>Hooks</code></li><li><code>Models</code></li><li><code>Serialization</code></li></ul><h2 id="undefined-column" tabindex="-1"><code>UNDEFINED_COLUMN</code> <a class="header-anchor" href="#undefined-column" aria-label="Permalink to "`UNDEFINED_COLUMN`""></a></h2><p>This error means a column that is used in some of your models is not found on the database table. You should be sure that;</p><ul><li>All model files are using the correct database table</li><li>The model file uses the correct columns on the database table.</li><li>The database table has the correct column.</li></ul><h2 id="undefined-relation-model" tabindex="-1"><code>UNDEFINED_RELATION_MODEL</code> <a class="header-anchor" href="#undefined-relation-model" aria-label="Permalink to "`UNDEFINED_RELATION_MODEL`""></a></h2><p>This error means that a relationship definition is pointing to a model which is not found.</p><h2 id="undefined-hook-model-relation" tabindex="-1"><code>UNDEFINED_HOOK_MODEL_RELATION</code> <a class="header-anchor" href="#undefined-hook-model-relation" aria-label="Permalink to "`UNDEFINED_HOOK_MODEL_RELATION`""></a></h2><p>That error means that there are some unknown model names under Hooks or Events folder. You must use the same model name in the hook and event folder.</p><p>Let's assume that you have a model called <code>User.ts</code>. You must have the following folders for this model;</p><ul><li><code>app/v1/Hooks/User/*.ts</code></li><li><code>app/v1/Events/User/*.ts</code></li></ul><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>You can not use a model name that can not be related to a model for the same version. You have to have a model called <code>User.ts</code> in your model folder.</p></div><h2 id="unacceptable-hook-file" tabindex="-1"><code>UNACCEPTABLE_HOOK_FILE</code> <a class="header-anchor" href="#unacceptable-hook-file" aria-label="Permalink to "`UNACCEPTABLE_HOOK_FILE`""></a></h2><p>You can not define a hook or event file in directly the hooks or events folder. All of your hooks and events should be defined under a model name.</p><p>Wrong:</p><ul><li><code>app/v1/Hooks/UserHook.ts</code></li><li><code>app/v1/Event/UserEven.ts</code></li></ul><p>Correct:</p><ul><li><code>app/v1/Hooks/User/onBeforePaginate.ts</code></li><li><code>app/v1/Event/User/onBeforePaginate.ts</code></li></ul>',35),l=[n];function t(d,r,h,c,p,E){return s(),a("div",null,l)}const m=e(o,[["render",t]]);export{k as __pageData,m as default};