Skip to content

Commit

Permalink
Update Doc
Browse files Browse the repository at this point in the history
  • Loading branch information
CaryZheng committed Aug 19, 2016
1 parent 2acb4c0 commit 3cbaf5d
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@
* [sign_up](api/sign_up.md)
* [is_account_existed](api/is_account_existed.md)
* [get_user_info](api/get_user_info.md)


## Error

* [error info format](api/error_info_format.md)
* [error info list](api/error_info_list.md)
23 changes: 23 additions & 0 deletions Doc/api/error_info_format.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# error info format

* **error**: error info
* **code**: main error id
* **desc**: main error description
* **sub_error**: sub error info
* **code**: sub error id
* **desc**: sub error description



```
{
"error": {
"desc": "auth fail",
"sub_error": {
"desc": "auth token invalid",
"code": 1001
},
"code": 1
}
}
```
43 changes: 43 additions & 0 deletions Doc/api/error_info_list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# error info list

```
{
"errors": [
{
"code": 1,
"desc": "auth fail"
},
{
"code": 4,
"desc": "request rejected"
},
{
"code": 5,
"zh-cn": "internal error"
}
],
"sub_errors": [
{
"code": 1001,
"desc": "auth token invalid"
},
{
"code": 4001,
"desc": "param error"
},
{
"code": 4002,
"desc": "account no existed"
},
{
"code": 4004,
"desc": "account or password error"
},
{
"code": 5001,
"desc": "internal database error"
}
]
}
```

0 comments on commit 3cbaf5d

Please sign in to comment.