Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
jio_mebibou
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Alexandra Rogova
jio_mebibou
Commits
7d2c0585
Commit
7d2c0585
authored
Jun 22, 2016
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ReplicateStorage: increase conflict error verbosity
parent
6e54a1e3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
src/jio.storage/replicatestorage.js
src/jio.storage/replicatestorage.js
+6
-2
test/jio.storage/replicatestorage.tests.js
test/jio.storage/replicatestorage.tests.js
+4
-2
No files found.
src/jio.storage/replicatestorage.js
View file @
7d2c0585
...
...
@@ -238,7 +238,9 @@
id
,
options
);
}
// Already exists on destination
throw
new
jIO
.
util
.
jIOError
(
"
Conflict on '
"
+
id
+
"
'
"
,
throw
new
jIO
.
util
.
jIOError
(
"
Conflict on '
"
+
id
+
"
':
"
+
JSON
.
stringify
(
doc
)
+
"
!==
"
+
JSON
.
stringify
(
remote_doc
),
409
);
});
}
...
...
@@ -343,7 +345,9 @@
return
;
}
if
(
conflict_force
!==
true
)
{
throw
new
jIO
.
util
.
jIOError
(
"
Conflict on '
"
+
id
+
"
'
"
,
throw
new
jIO
.
util
.
jIOError
(
"
Conflict on '
"
+
id
+
"
':
"
+
JSON
.
stringify
(
doc
)
+
"
!==
"
+
JSON
.
stringify
(
remote_doc
),
409
);
}
}
...
...
test/jio.storage/replicatestorage.tests.js
View file @
7d2c0585
...
...
@@ -859,7 +859,8 @@
})
.
fail
(
function
(
error
)
{
ok
(
error
instanceof
jIO
.
util
.
jIOError
);
equal
(
error
.
message
,
"
Conflict on 'conflict'
"
);
equal
(
error
.
message
,
"
Conflict on 'conflict':
"
+
"
{
\"
title
\"
:
\"
foo
\"
} !== {
\"
title
\"
:
\"
bar
\"
}
"
);
equal
(
error
.
status_code
,
409
);
})
.
then
(
function
()
{
...
...
@@ -1383,7 +1384,8 @@
})
.
fail
(
function
(
error
)
{
ok
(
error
instanceof
jIO
.
util
.
jIOError
);
equal
(
error
.
message
,
"
Conflict on '
"
+
id
+
"
'
"
);
equal
(
error
.
message
,
"
Conflict on '
"
+
id
+
"
':
"
+
"
{
\"
title
\"
:
\"
foo4
\"
} !== {
\"
title
\"
:
\"
foo5
\"
}
"
);
equal
(
error
.
status_code
,
409
);
})
.
then
(
function
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment