Question: I have an **Azure Function** with a **Blob Store** input. I can access the input file using the `$inputFile` variable, which is super easy.

To allow for dynamic blob selection, I pass a `config` query parameter which contains the name of the config to select.

The only issue I have is that if someone passes the name of a non-existent blob, the **Azure Function** instantly returns a 500 error, which isn't particularly user friendly -

> 
> Object reference not set to an instance of an object.
> 
> 
> 

It looks as though this error is generated before execution of my script even begins, so it may not be possible, but is there any way to change this behaviour so that I can send a more helpful message back to the user.

Here are my bindings from **function.json**, just in case -

```
{
  "bindings": [
    {
      "name": "req",
      "type": "httpTrigger",
      "direction": "in",
      "authLevel": "function",
      "methods": [
        "get"
      ]
    },
    {
      "type": "blob",
      "name": "inputBlob",
      "path": "configs/{config}.json",
      "connection": "AzureWebJobsDashboard",
      "direction": "in"
    },
    {
      "name": "res",
      "type": "http",
      "direction": "out"
    }
  ],
  "disabled": false
}

```

Answer: 
Because you are splitting a string using any sequence of digits as the separator. If your string was `'name1000name'` your response would be `['name', 'name']`.
There is a mistake in our regex. A solution is : 

```
n = re.split('(\d+)', s)

```