instructlab / instructlab-bot

GitHub bot to assist with the taxonomy contribution workflow
Apache License 2.0
14 stars 17 forks source link

precheck: Invalid Content-Type header in response #291

Closed bjhargrave closed 5 months ago

bjhargrave commented 5 months ago

The result of precheck is a page with .log and .yaml files.

However, the server response has

Content-Type: application/json-lines+json

for both files. The .log file is text and the .yaml file is YAML.

The incorrect content type in the response causes the browser to report an error that the file is not valid JSON.

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

nerdalert commented 5 months ago

@bjhargrave that's my fault 👋 Introduced it with the formatting. Was trying to leave this file handling method generic. https://github.com/instructlab/instructlab-bot/blob/1a8b79e3f877c4d9030657d1d1bbbcbedbda0eea/worker/cmd/generate.go#L1052