Format checked, contributing.md update (#49)

Co-authored-by: Wayne <5291640+ringoinca@users.noreply.github.com>
This commit is contained in:
Wei S.
2025-08-17 17:42:49 +03:00
committed by GitHub
parent ec1cf3cf0b
commit 7288286fd9
2 changed files with 14 additions and 7 deletions

View File

@@ -51,3 +51,13 @@ This project and everyone participating in it is governed by the [Open Archiver
- Follow the existing code style.
- Use TypeScript's strict mode.
- Avoid using `any` as a type. Define clear interfaces and types in the `packages/types` directory.
### Formatting
We use Prettier for code formatting. Before you commit new code, it is necessary to check code format by running this command from the root folder:
`pnpm run lint`
If there are any format issues, you can use the following command to fix them
`pnpm run format`

View File

@@ -33,13 +33,10 @@ export class IngestionController {
} catch (error: any) {
logger.error({ err: error }, 'Create ingestion source error');
// Return a 400 Bad Request for connection errors
return res
.status(400)
.json({
message:
error.message ||
'Failed to create ingestion source due to a connection error.',
});
return res.status(400).json({
message:
error.message || 'Failed to create ingestion source due to a connection error.',
});
}
};