tgstation-server 6.14.0
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
4using Newtonsoft.Json;
5
7{
11 public sealed class ErrorMessageResponse
12 {
17 public Version? ServerApiVersion { get; set; }
18
23 public string? Message { get; set; }
24
29 [ResponseOptions]
30 public string? AdditionalData { get; set; }
31
35 [EnumDataType(typeof(ErrorCode))]
36 [JsonProperty(Required = Required.Always)]
37 public ErrorCode ErrorCode { get; set; }
38
43 {
44 }
45
51 {
52 ErrorCode = errorCode;
53 Message = errorCode.Describe();
55 }
56 }
57}
Represents the header that must be present for every server request.
Definition ApiHeaders.cs:25
static readonly Version Version
Get the version of the Api the caller is using.
Definition ApiHeaders.cs:69
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:12
@ Required
DMAPI validation must suceed for the deployment to succeed.