Fixed all REST endpoints to use RestObjects instead of Dictionaries.
This commit is contained in:
parent
11f3099d30
commit
9a40c81b49
3 changed files with 18 additions and 39 deletions
|
|
@ -174,17 +174,15 @@ namespace Rests
|
|||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
return new Dictionary<string, string>
|
||||
return new RestObject("500")
|
||||
{
|
||||
{"status", "500"},
|
||||
{"error", "Internal server error."},
|
||||
{"errormsg", exception.Message},
|
||||
{"stacktrace", exception.StackTrace},
|
||||
};
|
||||
}
|
||||
return new Dictionary<string, string>
|
||||
return new RestObject("404")
|
||||
{
|
||||
{"status", "404"},
|
||||
{"error", "Specified API endpoint doesn't exist. Refer to the documentation for a list of valid endpoints."}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue