| Conditions | 4 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | package pinpoint |
||
| 10 | func (svc *Pinpoint) XExistsApp(ctx context.Context, appID string) (bool, error) { |
||
| 11 | _, err := svc.GetApp(ctx, GetAppRequest{ |
||
| 12 | ApplicationID: appID, |
||
| 13 | }) |
||
| 14 | if err == nil { |
||
| 15 | return true, nil |
||
| 16 | } |
||
| 17 | |||
| 18 | if e, ok := err.(errors.ErrorData); ok { |
||
| 19 | if e.GetAWSErrCode() == "NotFoundException" { |
||
| 20 | return false, nil |
||
| 21 | } |
||
| 22 | } |
||
| 23 | return false, err |
||
| 24 | } |
||
| 48 |