# REST API Error handling



## Algo implementation throws exception to REST API handler

## REST API handler catches exception

### Expected exception

### Unexpected exception

### Assertion failure

## REST API handler throws exception to Nano

## Nano catches exception and turns it into a NanoHTTPD.Response

### JSON payload

## REST API client receives payload

## REST API client decodes payload and prints to console










