Fix HTTP 501 -> HTTP 400 suggestions in PR review

This commit is contained in:
wiz
2022-07-10 14:51:09 +02:00
committed by GitHub
parent 18030ba33e
commit 22bd8c4bf8
2 changed files with 3 additions and 3 deletions

View File

@@ -39,7 +39,7 @@ class ChannelsRoutes {
private async $getChannelsForNode(req: Request, res: Response) {
try {
if (typeof req.query.public_key !== 'string') {
res.status(501).send('Missing parameter: public_key');
res.status(400).send('Missing parameter: public_key');
return;
}
const index = parseInt(typeof req.query.index === 'string' ? req.query.index : '0', 10) || 0;
@@ -57,7 +57,7 @@ class ChannelsRoutes {
private async $getChannelsByTransactionIds(req: Request, res: Response) {
try {
if (!Array.isArray(req.query.txId)) {
res.status(500).send('Not an array');
res.status(400).send('Not an array');
return;
}
const txIds: string[] = [];

View File

@@ -16,7 +16,7 @@ class GeneralLightningRoutes {
private async $searchNodesAndChannels(req: Request, res: Response) {
if (typeof req.query.searchText !== 'string') {
res.status(501).send('Missing parameter: searchText');
res.status(400).send('Missing parameter: searchText');
return;
}
try {