chore: Move to prettier standard double quotes (#1309)

This commit is contained in:
Tom Moor
2020-06-20 13:59:15 -07:00
committed by GitHub
parent 2a3b9e2104
commit f43deb7940
444 changed files with 5988 additions and 5977 deletions

View File

@ -1,7 +1,7 @@
// @flow
import Sequelize from 'sequelize';
import { snakeCase } from 'lodash';
import { type Context } from 'koa';
import Sequelize from "sequelize";
import { snakeCase } from "lodash";
import { type Context } from "koa";
export default function errorHandling() {
return async function errorHandlingMiddleware(
@ -25,18 +25,18 @@ export default function errorHandling() {
if (message.match(/Not found/i)) {
ctx.status = 404;
error = 'not_found';
error = "not_found";
}
if (message.match(/Authorization error/i)) {
ctx.status = 403;
error = 'authorization_error';
error = "authorization_error";
}
if (ctx.status === 500) {
message = 'Internal Server Error';
error = 'internal_server_error';
ctx.app.emit('error', err, ctx);
message = "Internal Server Error";
error = "internal_server_error";
ctx.app.emit("error", err, ctx);
}
ctx.body = {