Skip to content

Commit

Permalink
[FIXED JENKINS-16632] Catch AuthorizationException and don't echo the…
Browse files Browse the repository at this point in the history
… message, so we don't echo the creds.
  • Loading branch information
abayer committed Feb 5, 2013
1 parent 4f6acf0 commit 01991c6
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -20,6 +20,8 @@
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;

import org.jclouds.rest.AuthorizationException;

import javax.servlet.ServletException;
import java.io.IOException;
import java.io.PrintStream;
Expand Down Expand Up @@ -157,6 +159,10 @@ public boolean perform(AbstractBuild<?, ?> build,
blobStoreProfile.upload(blobStoreEntry.container, src);
}
}
} catch (AuthorizationException e) {
LOGGER.severe("Failed to upload files to Blob Store due to authorization exception.");
e.printStackTrace(listener.error("Failed to upload files"));
build.setResult(Result.UNSTABLE);
} catch (IOException e) {
LOGGER.severe("Failed to upload files to Blob Store: " + e.getMessage());
e.printStackTrace(listener.error("Failed to upload files"));
Expand Down

0 comments on commit 01991c6

Please sign in to comment.