[SERVER-133] Feature request: Improved error messaging Created: 07/Jul/09  Updated: 30/Jul/09  Resolved: 07/Jul/09

Status: Closed
Project: Core Server
Component/s: Usability
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Wouter Assignee: Eliot Horowitz (Inactive)
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

Instead of:

Array
(
[err] => E11000 duplicate key errorindex: example.books.$id dup key: { : 3 }
[n] => 0
[ok] => 1
)

Something like:

Array
(
[err] => Array
(
[num] => 11000
[msg] => duplicate key
[index] => example.books.$_id
[key] => 3
)
[n] => 0
[ok] => 1
)

This will make it much easier to handle errors in the user's code. Now, the same error can generate different messages (because the messages includes the key on which the method failed), which makes it really hard to distinguish if I'm dealing with a duplicate key error, or another error.

This goes for all errors of course. Each error message should include a 'num' field, and all errors (with their corresponding numbers) should be listed somewhere on your site.



 Comments   
Comment by Eliot Horowitz (Inactive) [ 30/Jul/09 ]

closed since resolved and no activity in 2 weeks.
re-open if still issues.

Comment by Eliot Horowitz (Inactive) [ 07/Jul/09 ]

see SERVER-112

Generated at Thu Feb 08 02:53:07 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.