Added validation for app name length when creating an app #27

Merged
tcdlpds merged 9 commits from ravindu/device-mgt-core:master into master 2 years ago
There is no content yet.
ravindu added 4 commits 2 years ago
tcdlpds requested changes 2 years ago
@ApiResponse(
code = 409,
message = "CONFLICT. \n Application exists"),
@ApiResponse(
Owner

What's the reason to use 411 error code to handle this case?

What's the reason to use 411 error code to handle this case?
Poster

Bit confused with the variable length and defined Content-Length header (it must be used when the server refuses to accept the request without a defined Content-Length header.). In here it must be bad request error code. I will correct it.

Bit confused with the variable length and defined Content-Length header (it must be used when the server refuses to accept the request without a defined Content-Length header.). In here it must be bad request error code. I will correct it.
Owner

Yes for this case you need to send Bad Request

Yes for this case you need to send Bad Request
tcdlpds marked this conversation as resolved
log.error(msg);
return Response.status(Response.Status.BAD_REQUEST).build();
}
if(appName.length()>20){
Owner

fix formatting issues

fix formatting issues
Poster

ok

ok
tcdlpds marked this conversation as resolved
ravindu added 1 commit 2 years ago
ravindu added 1 commit 2 years ago
ravindu added 1 commit 2 years ago
tcdlpds changed title from Added validation for app name length when creating an app (backend part) to Added validation for app name length when creating an app 2 years ago
ravindu added 1 commit 2 years ago
ravindu added 1 commit 2 years ago
tcdlpds approved these changes 2 years ago
tcdlpds merged commit e28c71d4ae into master 2 years ago

Reviewers

tcdlpds approved these changes 2 years ago
The pull request has been merged as e28c71d4ae.
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: community/device-mgt-core#27
Loading…
There is no content yet.