#community-help

'x-typesense-api-key' Error During Collection Creation

TLDR Jameshwart experienced a misleading error during collection creation. Jason and Kishore Nallan explained security measures and mentioned possible improvements for error logs in Typesense Cloud.

Powered by Struct AI
heart1
4
1mo
Solved
Join the chat
Aug 18, 2023 (1 month ago)
Jameshwart
Photo of md5-283d3397742c32cc2b6be6bda508c03e
Jameshwart
01:06 AM
hi guys we had issue on creating collections where the error is
a valid `x-typesense-api-key` header must be sent

The error above is a bit misleading because it is not directly telling us that the api key I am using is not allowed to create a new schema
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
01:07 AM
That’s by design. You don’t want a malicious actor to get insight into whether a key is valid and just doesn’t have enough permissions, or if it’s completely invalid
Jameshwart
Photo of md5-283d3397742c32cc2b6be6bda508c03e
Jameshwart
01:09 AM
thats fine. Im just sharing because it took me half of my day trying to debug what was wrong when I can create other collections and I did not know that creating a collections can be restricted
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
01:48 AM
We do provide additional information in the logs, but in Typesense Cloud these logs are not exposed. So that's something we can allow in future. Thanks for the feedback.
heart1