Functions filenames fail if they don't match exactly the filename
See original GitHub issueMight be intentional, but it is a difference between v1 and v2, when calling a function (e.g. functions/hello.js), if the cases are not exactly matching then the function fails. In v1, even if the filename was written in camelCase and the function was called with all lower letters (like a web url) the function was still executed. In v2, it gives a 404 and file not found error.
Reproduce:
- Following the docs, create a functions/hello.js file, then rename it to helLo.js.
- Try calling the function with
const { res, error } = await nhost.functions.call('/hello', { name: 'Johan' }) - See the 404 response
Expected outcome: The function should still be called
Thoughts: I would prefer to have the same handling as in v1 here, as I can’t think of any time when one needs to separate between two files based on capital letters. V1 also provided more flexibility in naming conventions on the backend (e.g. camelcase was possible)
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Reading a file without mentioning its specific file name in R
Maybe a better approach would be to read all file names in the directory, find the match, and then read that complete name....
Read more >File Name Functions (GNU make)
The argument of the function is regarded as a series of file names, separated by whitespace. (Leading and trailing whitespace is ignored.) Each...
Read more >How to fake a script file name inside a monolithic vimrc?
You can be sure that if two different files have a s:foo variable and a s:bar() function, they are certainly used for totally...
Read more >Error message when you open or save a file in Microsoft Excel
This error message occurs when you save or open a file if the path to the file (including the file name) exceeds 218...
Read more >Function FileFindFirstFile - AutoIt
Due to the underlying Windows API used (FindFirstFile), this function actually searches both the long and short filenames when looking for matches. If...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Domains are case insensitive but paths are (usually).
Test this:
http://www.google.com/intl/en/about/corporate/index.html
http://www.google.com/intl/en/ABOUT/corporate/index.html
Fair enough that it is intentional.
Just a comment, URLs are not case sensitive for the user. Try write in GoOgle.com in your browser and you’ll still be directed to google.com. Same with if you try and capitalize a article url on e.g. theverge.com