Skip to content

Regression on the API status code for invalid BNS from 404 to 400 #1435

Closed
@pradel

Description

@pradel

Describe the bug

Looks like there is a regression in the API for the name endpoint. Calling the API https://stacks-node-api.mainnet.stacks.co/v1/names/usernameTest endpoint returns a 400 HTTP error code. Previously it was returning 404 for the same endpoint. I started to notice this issue popping around the 8/9th November.

According to the code https://github.com/hirosystems/stacks-blockchain-api/blob/master/src/api/routes/bns/names.ts#L124, the HTTP code should be 404 so maybe a new addition in the repo is overwriting the code before it's sent to the client somehow.

To Reproduce

Open https://stacks-node-api.mainnet.stacks.co/v1/names/usernameTest and see that the HTTP status code is 400.

Expected behavior

The status code should be 404 as it was before.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions