Better exception error messages for mid-air edit collision

This commit is contained in:
Daniele Teti 2024-07-28 23:26:04 +02:00
parent 2e05917df3
commit 2732dd998a
2 changed files with 2 additions and 2 deletions

View File

@ -272,7 +272,7 @@ begin
lResp := fRESTClient.Head(lURL); lResp := fRESTClient.Head(lURL);
else else
begin begin
raise Exception.Create('Error Message'); raise Exception.Create('Invalid HTTP method');
end; end;
end; end;

View File

@ -3984,7 +3984,7 @@ begin
if lReqETag <> GetSHA1HashFromString(Data) then if lReqETag <> GetSHA1HashFromString(Data) then
begin begin
raise EMVCException.Create(HTTP_STATUS.PreconditionFailed, 'mid-air collisions detected, cannot update or delete resource.'); raise EMVCException.Create(HTTP_STATUS.PreconditionFailed, 'mid-air collisions detected (invalid "if-match" value), cannot update or delete resource.');
end; end;
end; end;