From cc60099091757b7f30c4dcb52264f73a5dde358f Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Mon, 5 Sep 2011 11:33:33 -0600 Subject: [PATCH] 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! --- TShockAPI/RestManager.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TShockAPI/RestManager.cs b/TShockAPI/RestManager.cs index af8125a9..b68a1ee7 100644 --- a/TShockAPI/RestManager.cs +++ b/TShockAPI/RestManager.cs @@ -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; }