File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
src/platform/browser_lite
test/integration/api_internal Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,8 @@ export class FetchConnection extends RestConnection {
61
61
headers,
62
62
body : requestJson
63
63
} ) ;
64
- } catch ( err : any ) {
64
+ } catch ( e ) {
65
+ const err = e as { status : number | undefined ; statusText : string } ;
65
66
throw new FirestoreError (
66
67
mapCodeFromHttpStatus ( err . status ) ,
67
68
'Request failed with error: ' + err . statusText
Original file line number Diff line number Diff line change 17
17
18
18
import { expect } from 'chai' ;
19
19
20
+ import { FirestoreError } from '../../../src' ;
20
21
import { DEFAULT_TRANSACTION_OPTIONS } from '../../../src/core/transaction_options' ;
21
22
import { TimerId } from '../../../src/util/async_queue' ;
22
23
import { Deferred } from '../../util/promise' ;
@@ -155,7 +156,8 @@ apiDescribe(
155
156
await transaction . set ( docRef , { count : 16 } ) ;
156
157
} ) ;
157
158
expect . fail ( 'transaction should fail' ) ;
158
- } catch ( err : any ) {
159
+ } catch ( e ) {
160
+ const err = e as FirestoreError ;
159
161
expect ( err ) . to . exist ;
160
162
expect ( err . code ) . to . equal ( 'aborted' ) ;
161
163
}
@@ -194,7 +196,8 @@ apiDescribe(
194
196
options
195
197
) ;
196
198
expect . fail ( 'transaction should fail' ) ;
197
- } catch ( err : any ) {
199
+ } catch ( e ) {
200
+ const err = e as FirestoreError ;
198
201
expect ( err ) . to . exist ;
199
202
expect ( err . code ) . to . equal ( 'aborted' ) ;
200
203
}
You can’t perform that action at this time.
0 commit comments