Skip to content

Commit f094a90

Browse files
committed
Update tests for exposing internal error description
1 parent 2f35a9d commit f094a90

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

FirebaseFunctions/Backend/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ exports.unknownErrorTest = functions.https.onRequest((request, response) => {
7878
response.status(400).send({
7979
error: {
8080
status: 'THIS_IS_NOT_VALID',
81-
message: 'this should be ignored',
81+
message: 'invalid response',
8282
},
8383
});
8484
});

FirebaseFunctions/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 10.11.0
2+
- [fixed] Provide more detail for internal errors. (#11310)
3+
14
# 10.10.0
25
- [fixed] Fixed potential memory leak of Functions instances. (#11248)
36
- [added] Callable functions can now opt in to using limited-use App Check

FirebaseFunctions/Tests/Integration/IntegrationTests.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ class IntegrationTests: XCTestCase {
442442
} catch {
443443
let error = error as NSError
444444
XCTAssertEqual(FunctionsErrorCode.internal.rawValue, error.code)
445-
XCTAssertNotEqual("INTERNAL", error.localizedDescription)
445+
XCTAssertEqual("INTERNAL", error.localizedDescription)
446446
expectation.fulfill()
447447
return
448448
}
@@ -473,7 +473,7 @@ class IntegrationTests: XCTestCase {
473473
} catch {
474474
let error = error as NSError
475475
XCTAssertEqual(FunctionsErrorCode.internal.rawValue, error.code)
476-
XCTAssertNotEqual("INTERNAL", error.localizedDescription)
476+
XCTAssertEqual("INTERNAL", error.localizedDescription)
477477
}
478478
}
479479
}
@@ -498,7 +498,7 @@ class IntegrationTests: XCTestCase {
498498
} catch {
499499
let error = error as NSError
500500
XCTAssertEqual(FunctionsErrorCode.internal.rawValue, error.code)
501-
XCTAssertNotEqual("INTERNAL", error.localizedDescription)
501+
XCTAssertEqual("invalid response", error.localizedDescription)
502502
expectation.fulfill()
503503
return
504504
}
@@ -528,7 +528,7 @@ class IntegrationTests: XCTestCase {
528528
} catch {
529529
let error = error as NSError
530530
XCTAssertEqual(FunctionsErrorCode.internal.rawValue, error.code)
531-
XCTAssertNotEqual("INTERNAL", error.localizedDescription)
531+
XCTAssertEqual("invalid response", error.localizedDescription)
532532
}
533533
}
534534
}

FirebaseFunctions/Tests/ObjCIntegration/FIRIntegrationTests.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ - (void)testUnknownError {
226226
completion:^(FIRHTTPSCallableResult *_Nullable result, NSError *_Nullable error) {
227227
XCTAssertNotNil(error);
228228
XCTAssertEqual(FIRFunctionsErrorCodeInternal, error.code);
229-
XCTAssertNotEqualObjects(@"INTERNAL", error.localizedDescription);
229+
XCTAssertEqualObjects(@"invalid response", error.localizedDescription);
230230
[expectation fulfill];
231231
}];
232232
[self waitForExpectations:@[ expectation ] timeout:10];

0 commit comments

Comments
 (0)