Skip to content

Commit

Permalink
fix: firebase config에 에러 로깅 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
dongchandev committed Sep 23, 2024
1 parent 22323f9 commit ffa42b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
run: |
touch ./dodam-application/dodam-rest-api/src/main/resources/dodamdodam-firebase-key.json
echo "${{ secrets.FIREBASE_KEY }}" > ./dodam-application/dodam-rest-api/src/main/resources/dodamdodam-firebase-key.json
cat ./dodam-application/dodam-rest-api/src/main/resources/dodamdodam-firebase-key.json
- name: Build with Gradle
run: ./gradlew :dodam-application:dodam-rest-api:build -x test --parallel

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
import com.google.auth.oauth2.GoogleCredentials;
import com.google.firebase.FirebaseApp;
import com.google.firebase.FirebaseOptions;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.ClassPathResource;

import javax.annotation.PostConstruct;
import java.io.InputStream;

@Slf4j
@Configuration
public class FirebaseConfig {
@PostConstruct
Expand All @@ -24,6 +26,7 @@ public void init(){
FirebaseApp.initializeApp(options);
}
} catch (Exception e){
log.error("error cause: {}", e.getCause());
throw new InternalServerException();
}
}
Expand Down

0 comments on commit ffa42b2

Please sign in to comment.