server: minor, improve error message
This commit is contained in:
parent
af835ff358
commit
96b07af7ac
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue