diff --git a/routes/scan.js b/routes/scan.js
index 9305af51e1ee63d1658cd9f5952f6b2d85ff2194..b0af9488ceefc6dbb34669f3070b7a13f1e1c0ef 100644
--- a/routes/scan.js
+++ b/routes/scan.js
@@ -128,13 +128,13 @@ module.exports = function* scan () {
   debug('received data from SQS');
 
   // Reject incoming data
-  function rejectData (msg) {
+  const rejectData = msg => {
     this.status = 400;
     this.body = {
       code: 400,
       message: msg
     };
-  }
+  };
 
   // Test incoming data
   if (this.req.body.Event === 's3:TestEvent') return rejectData('test event');