server: minor, improve error message

This commit is contained in:
King Kévin 2023-01-30 04:39:01 +01:00
parent af835ff358
commit 96b07af7ac
1 changed files with 1 additions and 1 deletions

View File

@ -419,7 +419,7 @@ get '/import/lcsc/:lcsc' do
part["attachments"] = result["productImages"]
part["datasheet"] = result["pdfUrl"]
existing = get_part_by_name(part["name"])
halt 401, "part name already exists" if existing
halt 401, "part #{part['name']} already exists" if existing
begin
add_part(part)
rescue StandardError => e