Skip to content

Commit ac068a7

Browse files
committed
narrow type
1 parent 8741e78 commit ac068a7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

web-app/src/screens/Console/Buckets/ListBuckets/AddBucket/addBucketsSlice.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import { createSlice, PayloadAction } from "@reduxjs/toolkit";
1818
import { addBucketAsync } from "./addBucketThunks";
19-
import { ObjectRetentionMode } from "api/consoleApi";
19+
import { ApiError, ObjectRetentionMode } from "api/consoleApi";
2020

2121
interface AddBucketState {
2222
loading: boolean;
@@ -36,7 +36,7 @@ interface AddBucketState {
3636
navigateTo: string;
3737
excludeFolders: boolean;
3838
excludedPrefixes: string;
39-
error: any;
39+
error: ApiError | null;
4040
}
4141

4242
const initialState: AddBucketState = {
@@ -186,7 +186,7 @@ const addBucketsSlice = createSlice({
186186
})
187187
.addCase(addBucketAsync.rejected, (state, action) => {
188188
state.loading = false;
189-
state.error = action.payload;
189+
state.error = action.payload as ApiError;
190190
})
191191
.addCase(addBucketAsync.fulfilled, (state, action) => {
192192
state.loading = false;

0 commit comments

Comments
 (0)