fix external API server error parsing
This commit is contained in:
parent
6558d0818c
commit
725e323f98
@ -46,7 +46,7 @@ namespace dopt.DeltaBarth.Tests
|
|||||||
Assert.AreEqual(102, parsed.code);
|
Assert.AreEqual(102, parsed.code);
|
||||||
Assert.IsTrue(parsed.description.Contains("internal error occurred"));
|
Assert.IsTrue(parsed.description.Contains("internal error occurred"));
|
||||||
Assert.AreEqual("caused by test", parsed.message);
|
Assert.AreEqual("caused by test", parsed.message);
|
||||||
Assert.IsNull(parsed.apiServerError);
|
Assert.IsNull(parsed.api_server_error);
|
||||||
PrettyPrint(parsed);
|
PrettyPrint(parsed);
|
||||||
plugin.Dispose();
|
plugin.Dispose();
|
||||||
}
|
}
|
||||||
@ -151,7 +151,7 @@ namespace dopt.DeltaBarth.Tests
|
|||||||
Assert.AreEqual(0, parsed.status.code);
|
Assert.AreEqual(0, parsed.status.code);
|
||||||
Assert.AreEqual("Erfolg", parsed.status.description);
|
Assert.AreEqual("Erfolg", parsed.status.description);
|
||||||
Assert.AreEqual("", parsed.status.message);
|
Assert.AreEqual("", parsed.status.message);
|
||||||
Assert.IsNull(parsed.status.apiServerError);
|
Assert.IsNull(parsed.status.api_server_error);
|
||||||
// check result
|
// check result
|
||||||
for (int i = 0; i < parsed.response.daten.Length; i++)
|
for (int i = 0; i < parsed.response.daten.Length; i++)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -37,6 +37,10 @@ namespace dopt.DeltaBarth.DataObjects
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string? title { get; init; }
|
public string? title { get; init; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
/// optional: zusätzliche Fehlerdetails, die vom Server ausgegeben wurden
|
||||||
|
/// </summary>
|
||||||
|
public Dictionary<string, List<string>>? errors { get; init; }
|
||||||
|
/// <summary>
|
||||||
/// optional: spezifischer ID (vermutlich zur Nachverfolgung) als Text, der vom Server ausgegeben wurde
|
/// optional: spezifischer ID (vermutlich zur Nachverfolgung) als Text, der vom Server ausgegeben wurde
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string? traceId { get; init; }
|
public string? traceId { get; init; }
|
||||||
@ -62,7 +66,7 @@ namespace dopt.DeltaBarth.DataObjects
|
|||||||
/// <summary cref="ApiServerError">
|
/// <summary cref="ApiServerError">
|
||||||
/// optional: eventuell aufgetretener API-Server-Fehler
|
/// optional: eventuell aufgetretener API-Server-Fehler
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ApiServerError? apiServerError { get; init; }
|
public ApiServerError? api_server_error { get; init; }
|
||||||
|
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user