tgstation-server 6.12.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 {
16 public Version? ServerApiVersion { get; set; }
17
21 public string? Message { get; set; }
22
26 [ResponseOptions]
27 public string? AdditionalData { get; set; }
28
32 [EnumDataType(typeof(ErrorCode))]
33 [JsonProperty(Required = Required.Always)]
34 public ErrorCode ErrorCode { get; set; }
35
40 {
41 }
42
48 {
49 ErrorCode = errorCode;
50 Message = errorCode.Describe();
52 }
53 }
54}
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.