Added messages to exceptions in api