Update try/catch syntax (#13732)
Update try/catch syntax to prepare for eslint migration
This commit is contained in:
+1
-1
@@ -17,7 +17,7 @@ export interface CursorData {
|
||||
export const decodeCursor = <T = CursorData>(cursor: string): T => {
|
||||
try {
|
||||
return JSON.parse(Buffer.from(cursor, 'base64').toString());
|
||||
} catch (err) {
|
||||
} catch {
|
||||
throw new GraphqlQueryRunnerException(
|
||||
`Invalid cursor: ${cursor}`,
|
||||
GraphqlQueryRunnerExceptionCode.INVALID_CURSOR,
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ export class ActivityQueryResultGetterHandler
|
||||
|
||||
try {
|
||||
blocknote = JSON.parse(blocknoteJson);
|
||||
} catch (error) {
|
||||
} catch {
|
||||
blocknote = [];
|
||||
// TODO: Remove this once we have removed the old rich text
|
||||
// eslint-disable-next-line no-console
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ const stringify = (value: any): string => {
|
||||
const parseJSON = (value: string): object => {
|
||||
try {
|
||||
return JSON.parse(value);
|
||||
} catch (e) {
|
||||
} catch {
|
||||
throw new ValidationError(`Value is not valid JSON: ${value}`);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user