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

500 error for GET /api/cve-id with date but no time #1328

Open
ElectricNroff opened this issue Jan 17, 2025 · 0 comments
Open

500 error for GET /api/cve-id with date but no time #1328

ElectricNroff opened this issue Jan 17, 2025 · 0 comments

Comments

@ElectricNroff
Copy link
Contributor

API call by any CNA:

GET /api/cve-id?time_reserved.gt=2025-01-01

Outcome:

HTTP/2 500

{"error":"SERVICE_NOT_AVAILABLE","message":"This service appears to not be available."}

This may be related to dateStr being out of scope on line 151:

if (value) {
const dateStr = value[0]
// Make sure that the string passed is a valid date
if (DateTime.fromISO(dateStr.toString()).isValid) {
result = new Date(dateStr)
}
} else {
value = val.match(/^\d{4}-\d{2}-\d{2}$/)
/* eslint-disable-next-line */
if ((value) && DateTime.fromISO(dateStr.toString()).isValid) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs Triage
Development

No branches or pull requests

1 participant