Skip to content

Commit

Permalink
Fix error messages for invalid response format in API gateway
Browse files Browse the repository at this point in the history
  • Loading branch information
tsutsu3 committed Dec 24, 2024
1 parent 82c079b commit 33b691a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/gateways/v5/api_gateway_v5.dart
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ class ApiGatewayV5 implements ApiGateway {
} else {
return SetWhiteBlacklistResponse(
result: APiResponseType.error,
message: 'not_exists',
message: 'Invalid response format',
);
}
} else {
Expand Down Expand Up @@ -634,7 +634,7 @@ class ApiGatewayV5 implements ApiGateway {
} else {
return RemoveDomainFromListResponse(

Check warning on line 635 in lib/gateways/v5/api_gateway_v5.dart

View check run for this annotation

Codecov / codecov/patch

lib/gateways/v5/api_gateway_v5.dart#L635

Added line #L635 was not covered by tests
result: APiResponseType.error,
message: 'not_exists',
message: 'Invalid response format',
);
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion test/gateways/v5/api_gateway_v5_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1029,7 +1029,7 @@ void main() {

expect(response.result, APiResponseType.error);
expect(response.data, isNull);
expect(response.message, isNull);
expect(response.message, 'Invalid response format');
});

test('Return error when unexpected exception occurs', () async {
Expand Down

0 comments on commit 33b691a

Please sign in to comment.