Skip to content

Commit 8173ceb

Browse files
committed
Add context to error message
1 parent af8f233 commit 8173ceb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/server/app_apis.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,12 +172,12 @@ func (s *Server) createApp(ctx context.Context, appEntry *types.AppEntry, approv
172172
if isGit(workEntry.SourceUrl) {
173173
// Checkout the git repo locally and load into database
174174
if err := s.loadSourceFromGit(ctx, tx, workEntry, branch, commit, gitAuth); err != nil {
175-
return nil, err
175+
return nil, fmt.Errorf("failed to load source %s from git: %w", workEntry.SourceUrl, err)
176176
}
177177
} else if !workEntry.IsDev {
178178
// App is loaded from disk (not git) and not in dev mode, load files into DB
179179
if err := s.loadSourceFromDisk(ctx, tx, workEntry); err != nil {
180-
return nil, err
180+
return nil, fmt.Errorf("failed to read source %s: %w", workEntry.SourceUrl, err)
181181
}
182182
}
183183

0 commit comments

Comments
 (0)