-
Notifications
You must be signed in to change notification settings - Fork 800
Open
Labels
Type/BugneedTriageThe issue has to be inspected and labeled manuallyThe issue has to be inspected and labeled manuallyuserCategory/Compilation
Description
Description
Hi Team,
public isolated function getBalVersion(http:RequestContext ctx, string componentId, string buildId) returns string?|error {
sql:ParameterizedQuery query = `SELECT
BALLERINA_VERSION
FROM
COMPONENT_BUILD_MAPPING
WHERE COMPONENT_ID = ${componentId} AND BUILD_ID = ${buildId}`;
sql:ExecutionResult|error result = dbClient->queryRow(query);
if (result is sql:NoRowsError) {
loggerDb.logDebug(
ctx,
string `No build-map found for the build ${buildId} and componentId ${componentId}`,
constants:DATABASE
);
return;
} else if (result is error) {
loggerDb.logError(
ctx,
string `Error while fetching the Balllerina version for component: ${componentId}`,
constants:DATABASE,
result
);
return result;
} else {
return <string>result.get("BALLERINA_VERSION");
}
}We have above method. If the code tries to execute the above condition,
return <string>result.get("BALLERINA_VERSION"); Ballerina Program is not providing any intuitive response and NULL value handling fails.
Steps to Reproduce
No response
Affected Version(s)
2201.10.2
No response
OS, DB, other environment details and versions
MSSQL DB
No response
Related area
-> Compilation
Compilation does not give any error and during the execution time program does not work as we expect.
Related issue(s) (optional)
No response
Suggested label(s) (optional)
No response
Suggested assignee(s) (optional)
No response
Metadata
Metadata
Assignees
Labels
Type/BugneedTriageThe issue has to be inspected and labeled manuallyThe issue has to be inspected and labeled manuallyuserCategory/Compilation