Improve error message

This commit is contained in:
Ingo Oppermann 2025-03-24 10:16:34 +01:00
parent 631fda502b
commit d54512d927
No known key found for this signature in database
GPG Key ID: 2AB32426E9DD229E

View File

@ -427,7 +427,7 @@ func (r *resources) Request(req Request) (Response, error) {
// Check if the requested resources are valid.
if req.CPU <= 0 || req.Memory == 0 {
logger.Debug().Log("Rejected, invalid values")
return res, fmt.Errorf("the cpu and/or memory values are invalid: cpu=%f, memory=%d", req.CPU, req.Memory)
return res, fmt.Errorf("the cpu and/or memory values are invalid. values > 0 are required: cpu=%f, memory=%d", req.CPU, req.Memory)
}
// Get current CPU and memory values.