File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 1
1
import { createError } from "micro" ;
2
2
export const unauthorized = ( error ) => createError ( 401 , "Unauthorized" , error ) ;
3
3
export const notFound = ( error ) => createError ( 404 , "Not Found" , error ) ;
4
+ export const notImplemented = ( error ) =>
5
+ createError ( 501 , "Not Implemented" , error ) ;
4
6
export const badRequest = ( error ) =>
5
7
createError ( 400 , typeof error === "string" ? error : "Bad request" , error ) ;
6
8
export const failedCheck = ( error ) =>
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import Ajv from "ajv";
2
2
import JSONStream from "JSONStream" ;
3
3
import { json } from "micro" ;
4
4
import mssql from "mssql" ;
5
- import { notFound , failedCheck , badRequest } from "./errors.js" ;
5
+ import { failedCheck , badRequest , notImplemented } from "./errors.js" ;
6
6
7
7
const TYPES = mssql . TYPES ;
8
8
@@ -161,7 +161,7 @@ export default (credentials) => async (req, res) => {
161
161
return queryStream ( req , res , pool ) ;
162
162
}
163
163
164
- throw notFound ( ) ;
164
+ throw notImplemented ( ) ;
165
165
}
166
166
} ;
167
167
You can’t perform that action at this time.
0 commit comments