Skip to content

Updated Lab With Exceptions.#81

Open
Mansura23 wants to merge 24 commits intoironhack-labs:mainfrom
URLeeo:main
Open

Updated Lab With Exceptions.#81
Mansura23 wants to merge 24 commits intoironhack-labs:mainfrom
URLeeo:main

Conversation

@Mansura23
Copy link
Copy Markdown

No description provided.

Teacher oldTeacher = getTeacherById(id);
if (name != null) {
oldTeacher.setName(name);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could use patch here to also update the salary, but that would required you to change in the model from the primitive to the wrapper, double to Double so you could check for null here.

There's nothing wrong, just an input if you wanted to add the salary update also on the patch.

this.status = status;
this.error = error;
this.message = message;
this.timestamp = LocalDateTime.now();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both here and on the ValidationErrorResponse you are accepting the timestamp but you are not actually using it.

@ahpoise
Copy link
Copy Markdown

ahpoise commented Mar 12, 2026

Two small notes. Other than that is a good Ironschool submission. Congrats.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants