OSM.loadSidebarContent(window.location.pathname, page.load);
},
error: function (xhr, xhr_status, http_status) {
- $(form).find("#comment-error").text(http_status);
+ $(form).find("#comment-error").text(xhr.responseText);
$(form).find("#comment-error").prop("hidden", false);
$(form).find("input[type=submit]").prop("disabled", false);
}
<div class="mb-3">
<textarea class="form-control" name="text" cols="40" rows="5"></textarea>
</div>
- <div id="comment-error" class="alert-danger p-2 mb-3" hidden>
+ <div id="comment-error" class="alert alert-danger p-2 mb-3" hidden>
</div>
<div>
<input type="submit" name="comment" value="<%= t("javascripts.changesets.show.comment") %>" data-changeset-id="<%= @changeset.id %>" data-method="POST" data-url="<%= changeset_comment_url(@changeset) %>" disabled="1" class="btn btn-sm btn-primary" />
# Raised when a rate limit is exceeded
class APIRateLimitExceeded < APIError
+ def initialize
+ super "Rate limit exceeded"
+ end
+
def status
:too_many_requests
end