Closed Bug 909669 Opened 6 years ago Closed 6 years ago

B2G RIL: Correct error code for MobileConnection API

Categories

(Core :: DOM: Device Interfaces, defect)

All
Gonk (Firefox OS)
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla26

People

(Reporter: aknow, Assigned: aknow)

Details

Attachments

(2 files, 2 obsolete files)

For call forwarding, in RILConetentHelper, we have
this.dispatchFireRequestError(requestId, "Invalid call forwarding reason.");
this.dispatchFireRequestError(requestId, "Invalid call forwarding rule definition.");

However in idl, we only list the following error code.
 Otherwise, the request's onerror will be called, and the request's error 
 will be either 'RadioNotAvailable', 'RequestNotSupported',               
 'IllegalSIMorME', or 'GenericFailure'                                    

The return error code we currently use is not available based on our interface description. This part should be modified.

Also, for call barring, we have
this.dispatchFireRequestError(requestId, "InvalidCallBarringOption");

Although this is available and indeed document on the interface, I would like to change all of above to 'InvalidParameter', which is already used in setRoamingPreference()

Align the error code of api might be better.
Flags: needinfo?(htsai)
Hsinyi, what is your idea for changing them to InvalidParameter?
(In reply to Szu-Yu Chen [:aknow] from comment #1)
> Hsinyi, what is your idea for changing them to InvalidParameter?

Sounds good to me.
We don't indeed change the API, but please help re-document comments. Thank you.
Flags: needinfo?(htsai)
Modify idl comments for call forwading and call barring API.
Attachment #798364 - Flags: review?(htsai)
The patch is generated based on Bug 909684. In that bug, I add a checking for the error code (InvalidCallBarringOption) of call barring in test case. Therefore, it is change to 'InvalidParameter' accordingly.
Attachment #798366 - Flags: review?(htsai)
Comment on attachment 798364 [details] [diff] [review]
Part 1: Change error code to InvalidParameter (idl)

Review of attachment 798364 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks for taking care of this.
Attachment #798364 - Flags: review?(htsai) → review+
Attachment #798366 - Flags: review?(htsai) → review+
Keywords: checkin-needed
You need to log in before you can comment on or make changes to this bug.