Skip to content

Commit 14dbbff

Browse files
committed
changed error message
1 parent 0ad910e commit 14dbbff

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

app/helpers/MetaFormats/RequestParamData.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function conformsToDefinition(mixed $value)
6868
$type = $validator::SWAGGER_TYPE;
6969
throw new InvalidArgumentException(
7070
$this->name,
71-
"The provided value for parameter '{$this->name}' did not pass validation of type '{$type}'."
71+
"The provided value did not pass the validation of type '{$type}'."
7272
);
7373
}
7474
}

app/helpers/MetaFormats/Validators/VInt.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ public function getExampleValue()
1818

1919
public function validate(mixed $value)
2020
{
21+
if (!MetaFormatHelper::checkType($value, PhpTypes::Int)) {
22+
throw new InternalServerException("err: {$value}");
23+
}
2124
return MetaFormatHelper::checkType($value, PhpTypes::Int);
2225
}
2326
}

0 commit comments

Comments
 (0)