A simple lib to handle common API errors