mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug 796993 - Get Quotes: Err msg if Alpha Vantage API key needed
AlphaVantage API Key is needed for all currency quotes and stock quotes with source 'alphavantage' or 'vanguard' or multi sources that include 'alphavantage'. Give an error message instead of failing with no reason.
This commit is contained in:
parent
60da4bd7bf
commit
f1ff45ecae
@ -128,6 +128,9 @@
|
||||
(catch #t
|
||||
(lambda ()
|
||||
(gnc:debug "handling-request: " request)
|
||||
(and (member (car request) '("currency" "alphavantage" "vanguard"))
|
||||
(not (getenv "ALPHAVANTAGE_API_KEY"))
|
||||
(throw 'need-alphavantage-key))
|
||||
;; we need to display the first element (the method,
|
||||
;; so it won't be quoted) and then write the rest
|
||||
(with-output-to-port (fdes->outport (gnc-process-get-fd quoter 0))
|
||||
@ -447,6 +450,11 @@
|
||||
(show-error (N_ "You are missing some needed Perl libraries.
|
||||
Run 'gnc-fq-update' as root to install them.")))
|
||||
|
||||
((memq 'need-alphavantage-key fq-results)
|
||||
(set! keep-going? #f)
|
||||
(show-error (N_ "ERROR: ALPHAVANTAGE_API_KEY must be set for currency \
|
||||
+ quotes; see https://wiki.gnucash.org/wiki/Online_Quotes#Source_Alphavantage.2C_US")))
|
||||
|
||||
((memq 'system-error fq-results)
|
||||
(set! keep-going? #f)
|
||||
(show-error (N_ "There was a system error while retrieving the price quotes.")))
|
||||
|
Loading…
Reference in New Issue
Block a user