Socket
Socket
Sign inDemoInstall

fast-azure-storage

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fast-azure-storage - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

43

lib/queue.js

@@ -472,22 +472,33 @@ 'use strict';

// Parse payload
var xml = libxml.parseXml(res.payload);
// Parse payload for error message and code
var message, code;
try {
var xml = libxml.parseXml(res.payload);
// Find error message
var message = xml.get('/Error/Message');
if (message) {
message = message.text();
} else {
message = "No error message given, in payload '" + res.payload + "'";
// Find error message
message = xml.get('/Error/Message');
if (message) {
message = message.text();
}
// Find error code
code = xml.get('/Error/Code');
if (code) {
code = code.text();
}
} catch (e) {
// Ignore parsing errors
}
// Find error code
var code = xml.get('/Error/Code');
if (code) {
code = code.text();
} else if (500 <= res.statusCode && res.statusCode < 600) {
code = 'InternalErrorWithoutCode';
} else {
code = 'ErrorWithoutCode';
// Find default message and code
if (!message) {
message = "No error message given, in payload '" + res.payload + "'";
}
if (!code) {
if (500 <= res.statusCode && res.statusCode < 600) {
code = 'InternalErrorWithoutCode';
} else {
code = 'ErrorWithoutCode';
}
}

@@ -494,0 +505,0 @@ // Construct error object

{
"name": "fast-azure-storage",
"version": "0.1.1",
"version": "0.1.2",
"author": "Jonas Finnemann Jensen <jopsen@gmail.com>",

@@ -5,0 +5,0 @@ "description": "Fast client library for azure storage services",

@@ -73,2 +73,11 @@ suite("Queue", function() {

test("getMetadata (from non-existent queue)", function() {
return queue.getMetadata(queueName + '-missing').then(function() {
assert(false, "Expected an error here");
}, function(err) {
// Bug in azure API means that we don't get an error code here
assert(err.statusCode === 404, "Expected 404");
});
});
test("setMetadata", function() {

@@ -75,0 +84,0 @@ // Don't actually want to change the meta-data as it would affect the

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc