create assignSponsorToProject#113
Conversation
| @Valid Project project = projectClient.getProject(projectId, " ", new GetProjectRequest()).block(); | ||
| if (user == null || project == null) { | ||
| throw new IllegalArgumentException("User API returned null for sponsorId = " + sponsorId + "projectId = "+projectId); | ||
| } |
There was a problem hiding this comment.
If we leave this as is, this will result in a big stack trace in the console, which we don't want. use PrintErr and then log.err so that the ui is maintained, but we can still see all info in the logs.
| "/api/v1/users/{userId}/limited": | ||
| get: | ||
| tags: | ||
| - User | ||
| parameters: | ||
| - name: userId | ||
| in: path | ||
| required: true | ||
| schema: | ||
| type: string | ||
| format: uuid | ||
| responses: | ||
| "200": | ||
| description: OK | ||
| content: | ||
| text/plain: | ||
| schema: | ||
| $ref: "#/components/schemas/UserResultLimited" | ||
| application/json: | ||
| schema: | ||
| $ref: "#/components/schemas/UserResultLimited" | ||
| text/json: | ||
| schema: | ||
| $ref: "#/components/schemas/UserResultLimited" |
There was a problem hiding this comment.
We don't need this, let's use the userslimsearch which is already available
| printNormal("Successfully assigned sponsor %s to project %s", sponsorId, projectId); | ||
| log.atTrace().log("Successfully assigned sponsor to project"); | ||
| } catch (HttpClientResponseException e) { | ||
| printError("Failed to assign sponsor %s to project %s. (%s: %s)", |
There was a problem hiding this comment.
make the print error clear what it is printing in the case the string interpolation fails or is formatted poorly,
printError("Failed to assign sponsor %s to project %s. %n%t Error Code %s: Error Message: %s",
the print error method will take multiline error prints and format it so the first line is a title and the following lines are formatted as a text body
This reverts commit ff38e55.
….java Co-authored-by: ZeterTheDuck <126122462+ZeterTheDuck@users.noreply.github.com> Signed-off-by: HMS-Victory <90852625+HMS-Victory@users.noreply.github.com>
Co-authored-by: ZeterTheDuck <126122462+ZeterTheDuck@users.noreply.github.com> Signed-off-by: HMS-Victory <90852625+HMS-Victory@users.noreply.github.com>
Signed-off-by: HMS-Victory <90852625+HMS-Victory@users.noreply.github.com>
change testuser property name from UUID to ID
0ed44a0 to
be502bd
Compare
|
@HMS-Victory will you @ me when you're ready for my review? |
This PR accomplishes the following: