How to resolve error message Malformed URI literal syntax

844 阅读1分钟

Description

When you are performing “read by guid” testing in OData request, you meet with the error message Malformed URI literal syntax .

Keywords

Postman, OData test, read by guid, Malformed URI literal syntax, regular_expression

Root cause

For example, the url used: ldciag3.wdf.jerry:44354/sap/opu/oda…
Note: you must add the prefix ‘guid’ before the guid value as naming convention.
Debug where this error message is raised, and we reach the framework code in line 22, where the validation is done based on the hard coded regular expression.

Solution

The solution for line 22 is clear, change the guid in url into “00163EA7-2000-1ED2-85EF-EFADF195A1B2”, and the validation will pass.
要获取更多Jerry的原创文章,请关注公众号"汪子熙":