Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
lengyel-arpad85 committed Dec 16, 2024
1 parent eb14c77 commit 3dc2aa4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 deletions backend/src/controllers/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,11 @@ export const saveUserConfig = async (req: Request, res: Response) => {
if (err.name === 'NoSuchKey') {
// file / config not found, continue with defaults
} else if (err.name === 'MissingGrant') {
res
.status(200)
.send({
grantRequired: true,
message: 'Grant confirmation is required'
})
return
res.status(200).send({
grantRequired: true,
message: 'Grant confirmation is required'
})
return
} else {
console.log(error)
res.status(500).send('An error occurred while fetching data')
Expand Down
2 changes: 1 addition & 1 deletion backend/src/services/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export class S3FileNotFoundError extends Error {

export class MissingGrantError extends Error {
constructor(message: string) {
super(message)
super(message)
this.name = 'MissingGrant'
}
}

0 comments on commit 3dc2aa4

Please sign in to comment.