STOP RETURNING "Error" and an error message people! You need an HTTP status code on EVERY response, preferably the FIRST response. All API result keys should be LOWER case!
This commit is contained in:
parent
c97ff36b73
commit
cc60099091
1 changed files with 2 additions and 1 deletions
|
|
@ -180,7 +180,8 @@ namespace TShockAPI {
|
|||
|
||||
if (ip == null && name == null)
|
||||
{
|
||||
returnBlock.Add("Error", "Required parameter missing.");
|
||||
returnBlock.Add("status", "400");
|
||||
returnBlock.Add("error", "Required parameters were missing from this API endpoint.");
|
||||
return returnBlock;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue