tgstation-server 5.12.1
The /tg/station 13 server suite
Loading...
Searching...
No Matches
ErrorMessageResponse.cs
Go to the documentation of this file.
1using System;
2using System.ComponentModel.DataAnnotations;
3
5{
9 public sealed class ErrorMessageResponse
10 {
14 public Version? ServerApiVersion { get; set; }
15
19 public string? Message { get; set; }
20
24 [ResponseOptions]
25 public string? AdditionalData { get; set; }
26
30 [EnumDataType(typeof(ErrorCode))]
31 public ErrorCode ErrorCode { get; set; }
32
37 {
38 }
39
45 {
46 ErrorCode = errorCode;
47 Message = errorCode.Describe();
49 }
50 }
51}
Represents the header that must be present for every server request.
Definition: ApiHeaders.cs:22
static readonly Version Version
Get the version of the Api the caller is using.
Definition: ApiHeaders.cs:61
Represents an error message returned by the server.
Version? ServerApiVersion
The version of the API the server is using.
ErrorMessageResponse(ErrorCode errorCode)
Initializes a new instance of the ErrorMessageResponse class.
string? Message
A human readable description of the error.
ErrorMessageResponse()
Initializes a new instance of the ErrorMessageResponse class.
string? AdditionalData
Additional data associated with the error message.
ErrorCode
Types of Response.ErrorMessageResponses that the API may return.
Definition: ErrorCode.cs:11