INNER CODE UNIT · TypeScript

setupServer

tot-ra/graphql-schema-registry · src/index.ts:34

const setupServer = async () => {
	if (process.env.NODE_ENV !== 'production') {
		const { default: setupDev } = await import('./setupDev');
		await setupDev(app);
	}

	app.use(router);
	await initGraphql(app);

	// eslint-disable-next-line
	app.use((err, req, res, next) => {
		// NOSONAR - Don't remove the next argument!!!
		const errorDetails = {
			correlationId: get(req, 'correlationId', null),
			url: req.url,
		};

		if (err.isJoi || err.isDisplayedToUser) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…