mirror of
https://github.com/lnbits/lnbits.git
synced 2025-04-11 13:31:52 +02:00
return http error UNAUTHORIZED instead of BAD_REQUEST if key is missing (#869)
* return http error UNAUTHORIZED instead of BAD_REQUEST if key is missing * fix regtest (#867) Co-authored-by: dni <dni.khr@gmail.com> * return http error UNAUTHORIZED instead of BAD_REQUEST if key is missing Co-authored-by: dni ⚡ <office@dnilabs.com> Co-authored-by: dni <dni.khr@gmail.com>
This commit is contained in:
parent
32a09f7359
commit
28661903b6
@ -270,7 +270,7 @@ async def api_payments_create(
|
||||
return await api_payments_create_invoice(invoiceData, wallet.wallet)
|
||||
else:
|
||||
raise HTTPException(
|
||||
status_code=HTTPStatus.BAD_REQUEST,
|
||||
status_code=HTTPStatus.UNAUTHORIZED,
|
||||
detail="Invoice (or Admin) key required.",
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user