Skip to content

Commit 7ce7ede

Browse files
committed
Add error message to unknown error
1 parent 4d3cc3e commit 7ce7ede

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

routes/api.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ export function createRouter(context: Context) {
3838
} else if (postType === URLType.Facebook) {
3939
content = await getFacebookContent(postId);
4040
} else {
41-
throw new FaucetError(ErrorCode.Unknown, null);
41+
throw new FaucetError(
42+
ErrorCode.Unknown,
43+
new Error("Invalid postType")
44+
);
4245
}
4346

4447
if (

0 commit comments

Comments
 (0)