File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -15,3 +15,6 @@ export const STATUS_CHECK = {
15
15
} ;
16
16
17
17
export const COMMAND_NOT_FOUND = "Command Not Found" ;
18
+
19
+ export const INTERNAL_SERVER_ERROR =
20
+ "Oops! We have encountered an internal Server Error" ;
Original file line number Diff line number Diff line change
1
+ import { INTERNAL_SERVER_ERROR } from "../constants/responses" ;
1
2
import { DISCORD_BASE_URL } from "../constants/urls" ;
2
3
import { env } from "../typeDefinitions/default.types" ;
3
4
@@ -20,8 +21,8 @@ export async function updateNickName(
20
21
if ( nameChangeResponse . ok ) {
21
22
return await nameChangeResponse . json ( ) ;
22
23
}
23
- return "Some internal Server error occurred" ;
24
24
} catch ( error ) {
25
25
console . log ( error ) ;
26
+ return INTERNAL_SERVER_ERROR ;
26
27
}
27
28
}
You can’t perform that action at this time.
0 commit comments