File tree Expand file tree Collapse file tree
src/ContentProcessorWeb/src/Services Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,14 +52,14 @@ export const handleApiThunk = async <T>(
5252 if ( response . status === 200 || response . status === 202 ) {
5353 return response . data as T ;
5454 } else {
55- return rejectWithValue ( `${ errorMessage } . Status: ${ response . status } ` ) ;
55+ return rejectWithValue ( `${ errorMessage } . Status: ${ response . status } ` ) as T ;
5656 }
5757 } catch ( error : unknown ) {
5858 const apiError = error as ApiError ;
5959 if ( apiError . status === 415 || apiError . status === 404 ) {
60- return rejectWithValue ( apiError . data ?. message || `Unexpected error: ${ errorMessage } ` ) ;
60+ return rejectWithValue ( apiError . data ?. message || `Unexpected error: ${ errorMessage } ` ) as T ;
6161 }
62- return rejectWithValue ( apiError . message || `Unexpected error: ${ errorMessage } ` ) ;
62+ return rejectWithValue ( apiError . message || `Unexpected error: ${ errorMessage } ` ) as T ;
6363 }
6464} ;
6565
You can’t perform that action at this time.
0 commit comments