public Optional < User > getOptionalUser ( String username ) { try { return ( Optional . ofNullable ( getUser ( username ) ) ) ; } catch ( GitLabApiException glae ) { return ( GitLabApi . createOptionalFromException ( glae ) ) ; } }
Lookup a user by username and return an Optional instance .