feat(server): better api error messages (for unhandled exceptions) (#4817)

* feat(server): better error messages

* chore: open api

* chore: remove debug log

* fix: syntax error

* fix: e2e test
This commit is contained in:
Jason Rasmussen
2023-11-03 21:33:15 -04:00
committed by GitHub
parent d4ef6f52bb
commit 2e424fe249
72 changed files with 1974 additions and 1952 deletions
+10 -10
View File
@@ -17,28 +17,28 @@ void main() {
// final instance = APIKeyApi();
group('tests for APIKeyApi', () {
//Future<APIKeyCreateResponseDto> createKey(APIKeyCreateDto aPIKeyCreateDto) async
test('test createKey', () async {
//Future<APIKeyCreateResponseDto> createApiKey(APIKeyCreateDto aPIKeyCreateDto) async
test('test createApiKey', () async {
// TODO
});
//Future deleteKey(String id) async
test('test deleteKey', () async {
//Future deleteApiKey(String id) async
test('test deleteApiKey', () async {
// TODO
});
//Future<APIKeyResponseDto> getKey(String id) async
test('test getKey', () async {
//Future<APIKeyResponseDto> getApiKey(String id) async
test('test getApiKey', () async {
// TODO
});
//Future<List<APIKeyResponseDto>> getKeys() async
test('test getKeys', () async {
//Future<List<APIKeyResponseDto>> getApiKeys() async
test('test getApiKeys', () async {
// TODO
});
//Future<APIKeyResponseDto> updateKey(String id, APIKeyUpdateDto aPIKeyUpdateDto) async
test('test updateKey', () async {
//Future<APIKeyResponseDto> updateApiKey(String id, APIKeyUpdateDto aPIKeyUpdateDto) async
test('test updateApiKey', () async {
// TODO
});
+9 -9
View File
@@ -19,8 +19,8 @@ void main() {
group('tests for AssetApi', () {
// Checks if assets exist by checksums
//
//Future<AssetBulkUploadCheckResponseDto> bulkUploadCheck(AssetBulkUploadCheckDto assetBulkUploadCheckDto) async
test('test bulkUploadCheck', () async {
//Future<AssetBulkUploadCheckResponseDto> checkBulkUpload(AssetBulkUploadCheckDto assetBulkUploadCheckDto) async
test('test checkBulkUpload', () async {
// TODO
});
@@ -70,8 +70,8 @@ void main() {
// TODO
});
//Future<AssetStatsResponseDto> getAssetStats({ bool isArchived, bool isFavorite, bool isTrashed }) async
test('test getAssetStats', () async {
//Future<AssetStatsResponseDto> getAssetStatistics({ bool isArchived, bool isFavorite, bool isTrashed }) async
test('test getAssetStatistics', () async {
// TODO
});
@@ -80,11 +80,6 @@ void main() {
// TODO
});
//Future<List<AssetResponseDto>> getByTimeBucket(TimeBucketSize size, String timeBucket, { String userId, String albumId, String personId, bool isArchived, bool isFavorite, bool isTrashed, bool withStacked, String key }) async
test('test getByTimeBucket', () async {
// TODO
});
//Future<List<CuratedLocationsResponseDto>> getCuratedLocations() async
test('test getCuratedLocations', () async {
// TODO
@@ -115,6 +110,11 @@ void main() {
// TODO
});
//Future<List<AssetResponseDto>> getTimeBucket(TimeBucketSize size, String timeBucket, { String userId, String albumId, String personId, bool isArchived, bool isFavorite, bool isTrashed, bool withStacked, String key }) async
test('test getTimeBucket', () async {
// TODO
});
//Future<List<TimeBucketResponseDto>> getTimeBuckets(TimeBucketSize size, { String userId, String albumId, String personId, bool isArchived, bool isFavorite, bool isTrashed, bool withStacked, String key }) async
test('test getTimeBuckets', () async {
// TODO
+5 -5
View File
@@ -17,11 +17,6 @@ void main() {
// final instance = AuthenticationApi();
group('tests for AuthenticationApi', () {
//Future<AdminSignupResponseDto> adminSignUp(SignUpDto signUpDto) async
test('test adminSignUp', () async {
// TODO
});
//Future<UserResponseDto> changePassword(ChangePasswordDto changePasswordDto) async
test('test changePassword', () async {
// TODO
@@ -52,6 +47,11 @@ void main() {
// TODO
});
//Future<AdminSignupResponseDto> signUpAdmin(SignUpDto signUpDto) async
test('test signUpAdmin', () async {
// TODO
});
//Future<ValidateAccessTokenResponseDto> validateAccessToken() async
test('test validateAccessToken', () async {
// TODO
+2 -2
View File
@@ -27,8 +27,8 @@ void main() {
// TODO
});
//Future<List<LibraryResponseDto>> getAllForUser() async
test('test getAllForUser', () async {
//Future<List<LibraryResponseDto>> getLibraries() async
test('test getLibraries', () async {
// TODO
});
+15 -15
View File
@@ -17,35 +17,35 @@ void main() {
// final instance = OAuthApi();
group('tests for OAuthApi', () {
//Future<OAuthAuthorizeResponseDto> authorizeOAuth(OAuthConfigDto oAuthConfigDto) async
test('test authorizeOAuth', () async {
// TODO
});
//Future<LoginResponseDto> callback(OAuthCallbackDto oAuthCallbackDto) async
test('test callback', () async {
//Future<LoginResponseDto> finishOAuth(OAuthCallbackDto oAuthCallbackDto) async
test('test finishOAuth', () async {
// TODO
});
// @deprecated use feature flags and /oauth/authorize
//
//Future<OAuthConfigResponseDto> generateConfig(OAuthConfigDto oAuthConfigDto) async
test('test generateConfig', () async {
//Future<OAuthConfigResponseDto> generateOAuthConfig(OAuthConfigDto oAuthConfigDto) async
test('test generateOAuthConfig', () async {
// TODO
});
//Future<UserResponseDto> link(OAuthCallbackDto oAuthCallbackDto) async
test('test link', () async {
//Future<UserResponseDto> linkOAuthAccount(OAuthCallbackDto oAuthCallbackDto) async
test('test linkOAuthAccount', () async {
// TODO
});
//Future mobileRedirect() async
test('test mobileRedirect', () async {
//Future redirectOAuthToMobile() async
test('test redirectOAuthToMobile', () async {
// TODO
});
//Future<UserResponseDto> unlink() async
test('test unlink', () async {
//Future<OAuthAuthorizeResponseDto> startOAuth(OAuthConfigDto oAuthConfigDto) async
test('test startOAuth', () async {
// TODO
});
//Future<UserResponseDto> unlinkOAuthAccount() async
test('test unlinkOAuthAccount', () async {
// TODO
});
+4 -4
View File
@@ -32,13 +32,13 @@ void main() {
// TODO
});
//Future<ServerVersionResponseDto> getServerVersion() async
test('test getServerVersion', () async {
//Future<ServerStatsResponseDto> getServerStatistics() async
test('test getServerStatistics', () async {
// TODO
});
//Future<ServerStatsResponseDto> getStats() async
test('test getStats', () async {
//Future<ServerVersionResponseDto> getServerVersion() async
test('test getServerVersion', () async {
// TODO
});
+2 -2
View File
@@ -22,8 +22,8 @@ void main() {
// TODO
});
//Future<SystemConfigDto> getDefaults() async
test('test getDefaults', () async {
//Future<SystemConfigDto> getConfigDefaults() async
test('test getConfigDefaults', () async {
// TODO
});