-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: proofs,data models, requests testing done
- Loading branch information
1 parent
963d6b6
commit 0aba14f
Showing
5 changed files
with
211 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export const STRING_VALIDATION_LENGTH = 3; | ||
export const STRING_VALIDATION_LENGTH = 2; | ||
export const TEST_DEFAULT_TIMEOUT = 10000; | ||
export const DEFAULT_TAKE_LIMIT = 15; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
export const errorHandler = (error: any): string => { | ||
return error.response.errors[0].message; | ||
// if (typeof error === 'object' && error !== null) { | ||
// if ( | ||
// Array.isArray(error.errors) && | ||
// error.errors.length > 0 && | ||
// 'message' in error.errors[0] | ||
// ) { | ||
// return error.errors[0].message; | ||
// } else if ('message' in error) { | ||
// return error.message; | ||
// } | ||
// } | ||
// return 'Something went wrong!'; | ||
// return error.response.errors[0].message; | ||
if (typeof error === 'object' && error !== null) { | ||
if ( | ||
Array.isArray(error.errors) && | ||
error.errors.length > 0 && | ||
'message' in error.errors[0] | ||
) { | ||
return error.errors[0].message; | ||
} else if ('message' in error) { | ||
return error.message; | ||
} | ||
} | ||
return 'Something went wrong!'; | ||
}; |