diff --git a/instruction/chess-tips/chess-tips.md b/instruction/chess-tips/chess-tips.md index 6cb059c8..66d70800 100644 --- a/instruction/chess-tips/chess-tips.md +++ b/instruction/chess-tips/chess-tips.md @@ -98,6 +98,22 @@ Or if this problem is happening with error handling, try to return the error in Return new Gson().toJson(Map.of(“message”, ex.getMessage())); ``` +## IntelliJ is giving me errors and is asking me to add the jackson dependency to my project + +It is possible that javalin will suggest that you use the jackson dependency to deal with serialization. If you see this suggestion, it could mean that you are not properly serializing your response or that your endpoint is not returning what the client expects. Check your return types and what you are sending across the server to the client and make sure it matches your sequence diagram and the project specs. + +In this project, **you should not add any additional dependencies** beyond what the project instruction tells you to add. + +## Autograder doesn't compile my project - package com.fasterxml.jackson.databind does not exist / expected: <401> but was: <500> + +If your code fails to compile in the autograder or you receive 500 HTTP status codes but runs fine on your local machine, one potential reason is that your project is using dependencies beyond what is used in the specifications of the project. This will cause problems because the autograder might not be using those dependencies. One specific dependency you might be using is jackson, which would be reflected if your handler or server is doing something similar to the following: + +```java +ctx.json(registerResponse); +``` + +The autograder expects you to use specific dependencies, one of which is Gson. Serializing your response with Gson rather than with Jackson will ensure that your project isn't using any dependencies that are undefined to the autograder. Feel free to look at [PetShop's Server class](https://github.com/softwareconstruction240/softwareconstruction/blob/main/petshop/server/src/main/server/PetServer.java) and examine how serialization is done there. + ## How do I read the authToken from an HTTP request? Refer to the [Web API](https://github.com/softwareconstruction240/softwareconstruction/blob/main/instruction/web-api/web-api.md#http-headers) instruction.