Possible error messages for API client + LinkSight integ (note that I'm referring to this set of HTTP status codes):
I'll be posting some code snippets, here's how you can set it up locally
import os
from dotenv import load_dotenv
import linksight
load_dotenv()
API_TOKEN = os.getenv('API_TOKEN')
400: Unrecognized column name/s: {}
Useful for catching wrong/misspelled column names. How to reproduce (using LinkSight client):
ls = linksight.Client(API_TOKEN)
with open('/path/to/dataset.csv') as fp:
ds = ls.create_dataset(fp)
match = ds.match(source_prov_col='Provence') # Should be province
415: Unsupported media type. Please use a CSV/TXT/XLSX file.
Useful for catching unsupported types. From the server side, the file is still processed and only fails when match is called. My suggestion is to catch this right away before they even interact with the /match endpoint
ls = linksight.Client(API_TOKEN)
with open('/path/to/dataset.pdf') as fp: # not a CSV file (here it's a PDF file, why not)
ds = ls.create_dataset(fp)
match = ds.match(source_prov_col='Province')
Possible error messages for API client + LinkSight integ (note that I'm referring to this set of HTTP status codes):
I'll be posting some code snippets, here's how you can set it up locally
400: Unrecognized column name/s: {}
Useful for catching wrong/misspelled column names. How to reproduce (using LinkSight client):
Related Sentry Issue
415: Unsupported media type. Please use a CSV/TXT/XLSX file.
Useful for catching unsupported types. From the server side, the file is still processed and only fails when match is called. My suggestion is to catch this right away before they even interact with the
/match
endpoint