Closed joefutrelle closed 6 years ago
I suspect this is because one of you recently updated the timeseries labels from "http" to "https". The pattern matching isn't exactly robust; the one character difference causes the timeseries url to not be stripped from the bin name, and you end up with issues like this.
I try to validate bins by looking for a 404, in which case you would've seen a slightly friendlier error, but the dashboard is awfully lenient with URLs and it makes it tough. In this case, for instance, we called out to:
https://ifcb-data.whoi.edu/mvco/http://ifcb-data.whoi.edu/mvco/D20170611T205930_IFCB010
And because this responds happily, we consider
http://ifcb-data.whoi.edu/mvco/D20170611T205930_IFCB010
an appropriate bin name stripped of its timeseries, when in fact it's not. Can you suggest a better way to validate bin names? This is an issue I'm experiencing in v2 development as well.
This particular instance is actually because the bad bin has non-filename characters. I've added a bit of error checking that should resolve this, but a more strict bin verification method would still be very nice.
A bin ID is either a "pid" with the full URL, or "lid" that doesn't have the leading timeseries namespace. Getting the lid is pretty trivial because you can just chop off everything before and including the trailing slash.
The JSON returned has a "pid" field containing the pid.
For various reasons it's important that the dashboard accept pids and not just lids. A compromise might be to return the lid as a property in the JSON response. That would also fix the case where the URL ends with an extension or something like "_short" followed by an extension.
Somehow this is happening:
I think this might be user error, but there should be a more graceful response than a 500.