forked from MapComplete/MapComplete
Feat: add DWG-block support
This commit is contained in:
parent
06363e808f
commit
c28baaab62
1 changed files with 10 additions and 1 deletions
|
@ -205,10 +205,19 @@ export class ChangesetHandler {
|
||||||
try {
|
try {
|
||||||
return await this.UploadWithNew(generateChangeXML, openChangeset, extraMetaTags)
|
return await this.UploadWithNew(generateChangeXML, openChangeset, extraMetaTags)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
const req = (<XMLHttpRequest>e)
|
||||||
|
if (req.status === 403) {
|
||||||
|
// Someone got the banhammer
|
||||||
|
// This is the message that OSM returned, will be something like "you have an important message, go to osm.org"
|
||||||
|
const msg = req.responseText
|
||||||
|
alert(msg+"\n\nWe'll take you to openstreetmap.org now")
|
||||||
|
window.location.replace(this.osmConnection.Backend())
|
||||||
|
return
|
||||||
|
}
|
||||||
if (this._reportError) {
|
if (this._reportError) {
|
||||||
this._reportError(e, "While opening a new changeset")
|
this._reportError(e, "While opening a new changeset")
|
||||||
}
|
}
|
||||||
if ((<XMLHttpRequest>e).status === 400) {
|
if (req.status === 400) {
|
||||||
// This request is invalid. We simply drop the changes and hope that someone will analyze what went wrong with it in the upload; we pretend everything went fine
|
// This request is invalid. We simply drop the changes and hope that someone will analyze what went wrong with it in the upload; we pretend everything went fine
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue