File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Jellyfin.HardwareVisualizer/Client/Pages Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ public async Task SubmitResults()
97
97
var id = postAsync . Object ;
98
98
NavigationManager . NavigateTo ( $ "/survey?submission={ WebUtility . UrlDecode ( id ) } ") ;
99
99
}
100
- else if ( postAsync . StatusCode == HttpStatusCode . BadRequest )
100
+ else if ( postAsync . StatusCode == HttpStatusCode . BadRequest && postAsync . ErrorResult is not null )
101
101
{
102
102
var problemDetails = postAsync . ErrorResult ;
103
103
ValidationErrors . AddRange ( problemDetails . Errors . SelectMany ( e => e . Value . Select ( f => new Error ( )
@@ -116,6 +116,16 @@ public async Task SubmitResults()
116
116
Path = ""
117
117
} ) ;
118
118
}
119
+ else
120
+ {
121
+ ValidationErrors . Add ( new Error ( )
122
+ {
123
+ Column = 0 ,
124
+ Line = 0 ,
125
+ Message = $ "Unkown error submitting the result: { postAsync . StatusMessage } - { postAsync . Object } ",
126
+ Path = ""
127
+ } ) ;
128
+ }
119
129
}
120
130
121
131
private async Task OnEditorInitialized ( )
You can’t perform that action at this time.
0 commit comments