Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Error Handling to YahooJSON.pm #390

Closed
bpschuck opened this issue Apr 28, 2024 · 0 comments · Fixed by #394
Closed

Add Error Handling to YahooJSON.pm #390

bpschuck opened this issue Apr 28, 2024 · 0 comments · Fixed by #394
Labels
enhancement discussions about new features / enhancements of code next release

Comments

@bpschuck
Copy link
Contributor

The YahooJSON.pm module needs to add error handling for the cookies and crumb URL fetches.

Instead of continuing to the loop of stock symbols the method should populate the hash and return.

Code would look similar to:

if ($reply->code != 200) {
  foreach my $symbol (@stocks) {
    $info{$symbol, "success"} = 0;
    $info{$symbol, "errormsg"} = $errormsg;
  }     
  return wantarray() ? %info : \%info;
}
@bpschuck bpschuck added next release enhancement discussions about new features / enhancements of code labels Apr 28, 2024
@bpschuck bpschuck assigned bpschuck and unassigned bpschuck May 1, 2024
@bpschuck bpschuck mentioned this issue May 1, 2024
bpschuck added a commit that referenced this issue May 17, 2024
	* Fixed AEX.pm
	* Removed throttling from AlphaVantage.pm - Issue #363
	* Added CurrencyFreaks.pm - new currency module
	* YahooJSON.pm - added more error handling - Issue #390
	* Fixed MarketWatch.pm module - Issue #389
	* Fool.pm - Rewrote Fool.pm and added back to F::Q. Issue #379.
	* New Module! StockData.pm. Methods stockdata, nyse, nasdaq.
	* Modified yahooJSON.pm module in order handle EU consent redirects better.
  * TwelveData.pm - Added "last" to data being returned
	* BorsaItaliana.pm - New module for Borsa Italiana, Italian traded bonds using ISIN
	* YahooWeb.pm - Issue #377. Modified YahooWeb to account for changes from Yahoo.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement discussions about new features / enhancements of code next release
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

1 participant