@@ -1223,7 +1223,7 @@ describe("get-names API E2E", () => {
12231223 * - Invalid parameters
12241224 * - Proper error messages
12251225 */
1226- test ( "returns 400 with invalid API key" , async ( ) => {
1226+ test ( "returns 401 with invalid API key" , async ( ) => {
12271227 const req = createRequest ( {
12281228 method : "GET" ,
12291229 query : {
@@ -1236,7 +1236,7 @@ describe("get-names API E2E", () => {
12361236
12371237 await handler ( req , response ) ;
12381238
1239- expect ( response . _getStatusCode ( ) ) . toBe ( 400 ) ;
1239+ expect ( response . _getStatusCode ( ) ) . toBe ( 401 ) ;
12401240 expect ( JSON . parse ( response . _getData ( ) ) ) . toEqual ( {
12411241 error : "Domain does not exist"
12421242 } ) ;
@@ -1249,13 +1249,12 @@ describe("get-names API E2E", () => {
12491249 network : networkConfig . path ,
12501250 domain : "nonexistent.eth"
12511251 } ,
1252- headers : { authorization : networkConfig . apiKey }
12531252 } ) ;
12541253 const response = createResponse ( ) ;
12551254
12561255 await handler ( req , response ) ;
12571256
1258- expect ( response . _getStatusCode ( ) ) . toBe ( 400 ) ;
1257+ expect ( response . _getStatusCode ( ) ) . toBe ( 400 ;
12591258 expect ( JSON . parse ( response . _getData ( ) ) ) . toEqual ( {
12601259 error : "Domain does not exist"
12611260 } ) ;
0 commit comments