vespa
vespa copied to clipboard
Validate document type name in document api
The error message when the doctype name is wrong is difficult to understand and fix:
curl -XDELETE --key /Users/andreer/.vespa/scoober.test-app.andreer/data-plane-private-key.pem --cert /Users/andreer/.vespa/scoober.test-app.andreer/data-plane-public-cert.pem 'https://e8627032.decdbfd8.z.vespa-app.cloud/document/v1/mynamespace/musicc/docid?selection=true&cluster=music' {"pathId":"/document/v1/mynamespace/musicc/docid","message":"Document type 'musicc' in cluster 'music' is not mapped to a known bucket space"}
It would be nice if we could validate it and give a helpful and easy to understand error message like when the cluster name is wrong:
{"pathId":"/document/v1/mynamespace/music/docid","message":"Your Vespa deployment has no content cluster 'musicc', only 'music'"}
Try to improve the error message.
#31255