andela/team-odd-bn-backend

View on GitHub
src/middlewares/socialErrorHandler.js

Summary

Maintainability
A
0 mins
Test Coverage
import Response from '../helpers/Response';

const socialErrorHandler = (error, req, res, next) => {
  if (error) {
    return Response.errorMessage(req, res, 'Authentication error', 400);
  }
  next();
};

export default socialErrorHandler;