Here I have some tips and solutions for Vania dart errors. I have decided to list all the errors here.
Let's get the ball rolling.
Status code 500
There could be tons of reasons for 500. But two main categories of them. Either syntax error or database field error. Here I encountered first error in Vania dart. That was 500 due to wrong ussage of await modifier.
I put await in the wrong place. That's why during the postman test I was getting 500 status code. The modifer was supposed to be at the earlier line like below
var auth = await Auth().login(user).
Then my problem solved. You need to remember that 500 happens due to syntax or database error.
PersonalAccessTokens
Make sure you have a personal_access_tokens table in your database. This is something you need to create manually.
If you don't create that table, you won't be able to store token using Vania dart framework. Other framework may provide a default machanism for creating the table.
You may also get error 500 if you use try to store token login without create personal_access_tokens.
Endpoint 404
Using camelCase letters for the "vania" endpoint in your request will result in a 404 error. Ensure that vania's endpoints are written in all lowercase letters to avoid this issue.