diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index 7e5e7ef1..a37baa3c 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -121,4 +121,25 @@ After log in successfully, you can find `JWT` in cookie:
Postman will also cache your cookie here: \

-If you need to clean cookie and login against, please select `Cookies` and remove `Authorization` cookie
\ No newline at end of file
+If you need to clean cookie and login against, please select `Cookies` and remove `Authorization` cookie
+
+### Testing
+
+#### Unit tests
+
+To run unit tests, you can either run through IntelliJ or through terminal using this command:
+```shell
+./gradlew test
+```
+> \[!IMPORTANT\]
+> Since we are using testing container, make sure to have `Docker` running in the background before triggering the unit tests
+
+
+#### Mutation tests
+To run mutation tests, you can use the following command:
+```shell
+./gradlew pitest
+```
+
+#### Load tests
+To run the load test, please follow the instructions shown in [loadtest.js](src/test/java/com/backend/coapp/_performance/loadtest.js).
\ No newline at end of file
diff --git a/README.md b/README.md
index 090c5652..52e2db0b 100644
--- a/README.md
+++ b/README.md
@@ -34,5 +34,9 @@ docker image build -t coapp-backend .
2. Run docker image
```bash
-docker run -d -p 8080:8080 coapp-backend
-```
+docker run -d \
+ -p 8080:8080 \
+ -v $(pwd)/local.properties:/app/local.properties \
+ -e SPRING_CONFIG_ADDITIONAL_LOCATION=file:/app/local.properties \
+ coapp-backend
+ ```
diff --git a/docs/API-feat6.md b/docs/API-feat6.md
index 86deba49..25a4fef5 100644
--- a/docs/API-feat6.md
+++ b/docs/API-feat6.md
@@ -53,6 +53,16 @@ Response body:
}
```
+**Response 503 SERVICE UNAVAILABLE**
+
+Response body:
+```json
+{
+ "error": "SERVICE_UNAVAILABLE",
+ "message": "Our AI service is currently unavailable. Please try again later."
+}
+```
+
**Path:** `api/resume-ai-advisor/remaining-quota`
**Method:** `GET`
diff --git a/src/main/java/com/backend/coapp/exception/genai/GenAIOutOfServiceException.java b/src/main/java/com/backend/coapp/exception/genai/GenAIOutOfServiceException.java
new file mode 100644
index 00000000..92507e93
--- /dev/null
+++ b/src/main/java/com/backend/coapp/exception/genai/GenAIOutOfServiceException.java
@@ -0,0 +1,8 @@
+package com.backend.coapp.exception.genai;
+
+/** This exception will be thrown when we reach usage limit. User need to try again later. */
+public class GenAIOutOfServiceException extends RuntimeException {
+ public GenAIOutOfServiceException(String message) {
+ super("Our AI service failure. " + message);
+ }
+}
diff --git a/src/main/java/com/backend/coapp/handler/GlobalExceptionHandler.java b/src/main/java/com/backend/coapp/handler/GlobalExceptionHandler.java
index 043d7f7a..b6dbae6e 100644
--- a/src/main/java/com/backend/coapp/handler/GlobalExceptionHandler.java
+++ b/src/main/java/com/backend/coapp/handler/GlobalExceptionHandler.java
@@ -25,7 +25,11 @@
import org.springframework.web.bind.annotation.RestControllerAdvice;
import tools.jackson.databind.exc.InvalidFormatException;
-/** Exception handler for controller. */
+/**
+ * Exception handler for controller.
+ *
+ *
Internal exceptions (5** HTTP status) will be logged for debugging.
+ */
@RestControllerAdvice
@Slf4j
public class GlobalExceptionHandler {
@@ -63,7 +67,7 @@ public ResponseEntity