Added exceptions for endpoints api