hansonw / consilium

0 stars 0 forks source link

Possibly intermittent error when generating document #101

Closed DouglasSherk closed 11 years ago

DouglasSherk commented 11 years ago

I got this once when I generated a document:

TypeError (no implicit conversion of Hash into String):
  app/controllers/api/documents_controller.rb:82:in `gen_document'
  app/controllers/api/documents_controller.rb:96:in `show'

  Rendered /Users/dsherk/.rvm/gems/ruby-2.0.0-p0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/_source.erb (0.5ms)
  Rendered /Users/dsherk/.rvm/gems/ruby-2.0.0-p0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/_trace.erb (0.9ms)
  Rendered /Users/dsherk/.rvm/gems/ruby-2.0.0-p0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.8ms)
  Rendered /Users/dsherk/.rvm/gems/ruby-2.0.0-p0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (11.4ms)

It went away after a restart, but I didn't do anything that I can think of to either cause it or resolve it. I used the fully filled out client:

"{\"_id\":\"13fef1c5b2700298fd91\",\"accountNumber\":{\"updated_at\":1374106233232,\"value\":\"Account Num\"},\"address\":{\"updated_at\":1374106233232,\"value\":\"Addresss\"},\"americanPercent\":{\"updated_at\":1374106425489,\"value\":\"48\"},\"annualGrossReceipts\":{\"updated_at\":1374106425489,\"value\":\"50\"},\"annualPayroll\":{\"updated_at\":1374106425489,\"value\":\"30\"},\"businessStartDate\":{\"updated_at\":1374106425489,\"value\":\"2003-03-03\"},\"businessType\":{\"updated_at\":1374106233232,\"value\":\"Individual\"},\"canadianPercent\":{\"updated_at\":1374106425489,\"value\":\"49\"},\"city\":{\"updated_at\":1374106233232,\"value\":\"Cityy\"},\"claimsInfos\":{\"updated_at\":1374106390158,\"value\":[{\"lossDate\":{\"value\":\"2203-11-02\"},\"claimType\":{\"value\":\"Claime\"},\"description\":{\"value\":\"Desc\"},\"amountPaid\":{\"value\":\"30\"},\"reserve\":{\"value\":\"5\"}},{\"lossDate\":{\"value\":\"0003-03-03\"},\"claimType\":{\"value\":\"o\"},\"description\":{\"value\":\"y\"},\"amountPaid\":{\"value\":\"0009\"},\"reserve\":{\"value\":\"233\"}}]},\"clientContacts\":{\"updated_at\":1374106285194,\"value\":[{\"name\":{\"value\":\"Namee\"},\"title\":{\"value\":\"Titlee\"},\"position\":{\"value\":\"Bitch\"},\"phone\":{\"value\":\"1112223333\"},\"email\":{\"value\":\"email@contact.com\"},\"other\":{\"value\":\"Oh\"}},{\"name\":{\"value\":\"Sudo su\"},\"title\":{\"value\":\"suuuuuuu\"},\"position\":{\"value\":\"Accountant\"},\"phone\":{\"value\":\"1112223333\"},\"email\":{\"value\":\"aws@sherk.me\"},\"other\":{\"value\":\"akljdhsf\"}}]},\"company\":{\"updated_at\":1374106233232,\"value\":\"Companyy\"},\"country\":{\"updated_at\":1374106233232,\"value\":\"Countryy\"},\"coverageFrom\":{\"updated_at\":1374106445802,\"value\":\"2009-03-05\"},\"coverageTo\":{\"updated_at\":1374106445802,\"value\":\"2010-03-05\"},\"covered\":{\"updated_at\":1374106425489,\"value\":\"fail coverage\"},\"created_at\":\"2013-07-18T00:10:33Z\",\"dateKnown\":{\"updated_at\":1374106460197,\"value\":\"0001-01-01\"},\"descriptionOperations\":{\"updated_at\":1374106285194,\"value\":\"Being bitches\"},\"emailAddress\":{\"updated_at\":1374106233232,\"value\":\"a@b.com\"},\"fax\":{\"updated_at\":1374106233232,\"value\":\"5194858485\"},\"foreignPercent\":{\"updated_at\":1374106425489,\"value\":\"3\"},\"fullTimeEmployees\":{\"updated_at\":1374106425489,\"value\":\"5\"},\"industryCode\":{\"updated_at\":1374106285194,\"value\":\"111111\"},\"locationInfos\":{\"updated_at\":1374107074465,\"value\":[{\"locationNumber\":{\"value\":\"#1\"},\"locationType\":{\"value\":\"Urban\"},\"locationAddress\":{\"value\":\"123 Fake St.\"},\"locationCity\":{\"value\":\"Faketown\"},\"locationCountry\":{\"value\":\"Fakecountry\"},\"locationProvinceState\":{\"value\":\"Fakestate\"},\"locationPostalCode\":{\"value\":\"12345\"},\"inspection\":{\"value\":{\"yes\":null}},\"inspectionDate\":{\"value\":\"2333-03-03\"},\"inspectedBy\":{\"value\":\"penisclown\"},\"riskSeverity\":{\"value\":\"veryGood\"},\"scopeOfInsuredProperty\":{\"value\":\"ALL THE THINGS\"},\"riskInfoType\":{\"value\":\"Commercial Equipment\"},\"riskInfoNotes\":{\"value\":\"aasdf\"},\"riskInfoLimit\":{\"value\":\"asdf\"},\"constructionStories\":{\"value\":\"ffdfdf\"},\"yearBuilt\":{\"value\":\"assdf\"},\"constructionArea\":{\"value\":\"fdsaf\"},\"constructionAreaUnit\":{\"value\":\"Sq. ft.\"},\"constructionWalls\":{\"value\":\"Steel on steel\"},\"constructionFloors\":{\"value\":\"Frame and all other\"},\"constructionBasement\":{\"value\":\"Non-combustible without masonry\"},\"constructionRoof\":{\"value\":\"Steel Beam\"},\"constructionRoofCovering\":{\"value\":\"Metal\"},\"constructionElectrical\":{\"value\":\"Fuses\"},\"constructionPlumbing\":{\"value\":\"Galvanized\"},\"constructionHeating\":{\"value\":\"Slow wood burning/air tight stove\"},\"constructionFuel\":{\"value\":\"Naptha gas\"},\"renovationsNoneKnown\":{\"value\":{\"yes\":true}},\"renovationsPlumbing\":{\"value\":{\"yes\":false}},\"renovationsRoof\":{\"value\":{\"yes\":true}},\"renovationsRoofYear\":{\"value\":\"2010\"},\"renovationsRoofCompletePartial\":{\"value\":\"complete\"},\"fireHydrants\":{\"value\":\"Within 300m\"},\"fireDepartment\":{\"value\":\"Within 5km\"},\"extinguishingSystem\":{\"value\":\"Sprinkler\"},\"extinguishingAgent\":{\"value\":\"chemical\"},\"fireAlarm\":{\"value\":\"Central Station\"},\"coveragePercent\":{\"value\":\"50\"},\"standpipe\":{\"value\":{\"yes\":true}},\"otherFireInfo\":{\"value\":\"oh\"},\"protectionTypes\":{\"value\":{\"concealed\":true,\"sturdyDoors\":true,\"motionLighting\":true,\"perimeter\":true,\"steelPost\":true}},\"burglarAlarm\":{\"value\":\"Central Station\"},\"safeType\":{\"value\":\"burglary\"},\"safeClass\":{\"value\":\"6\"},\"crimeProtectionOther\":{\"value\":\"asdfkllk\"},\"occupancyInsured\":{\"value\":\"ljkhasdfkljh\"},\"occupancyOthers\":{\"value\":\"ljhaksdlhfkljasdf\"},\"exposuresLeft\":{\"value\":\"left\"},\"exposuresRight\":{\"value\":\"right\"},\"exposuresBehind\":{\"value\":\"behind\"},\"coverageSchedules\":{\"value\":[{\"type\":{\"value\":\"Money \\u0026 Securities\"},\"category\":{\"value\":\"Crime\"},\"deductible\":{\"value\":\"123\"},\"coIns\":{\"value\":\"32\"},\"limit\":{\"value\":\"12\"}},{\"type\":{\"value\":\"Umbrella Liability\"},\"category\":{\"value\":\"Umbrella\"},\"deductible\":{\"value\":\"343\"},\"coIns\":{\"value\":\"3545\"},\"limit\":{\"value\":\"34535\"}},{\"type\":{\"value\":\"Signs Floater (Broad)\"},\"category\":{\"value\":\"Property\"},\"deductible\":{\"value\":\"1233\"},\"coIns\":{\"value\":\"243452\"},\"limit\":{\"value\":\"23455\"}}]},\"autoSchedules\":{\"value\":[{\"itemNumber\":{\"value\":\"123\"},\"unitNumber\":{\"value\":\"1322\"},\"owner\":{\"value\":\"Contractor\"},\"financeCompany\":{\"value\":\"yes\"},\"year\":{\"value\":\"9\"},\"make\":{\"value\":\"lkajsf\"},\"model\":{\"value\":\"lkjalskdf\"},\"serialNumber\":{\"value\":\"lkjaklsf\"},\"plateNumber\":{\"value\":\"kjhklasdf\"},\"colour\":{\"value\":\"jklhkjl\"},\"lessor\":{\"value\":\"h\"},\"dateAdded\":{\"value\":\"0001-01-01\"},\"policyExpiry\":{\"value\":\"0020-02-23\"},\"deleted\":{\"value\":\"0123-12-31\"},\"premium\":{\"value\":\"5\"},\"premiumCredit\":{\"value\":\"6\"},\"cargo\":{\"value\":\"7\"},\"cargoCredit\":{\"value\":\"8\"}},{\"itemNumber\":{\"value\":\"124\"},\"unitNumber\":{\"value\":\"9123\"},\"owner\":{\"value\":\"penisclowns\"},\"financeCompany\":{\"value\":\"yes\"},\"year\":{\"value\":\"3\"},\"make\":{\"value\":\"yes\"},\"model\":{\"value\":\"ih\"},\"serialNumber\":{\"value\":\"kjo\"},\"plateNumber\":{\"value\":\"3\"},\"colour\":{\"value\":\"o\"},\"lessor\":{\"value\":\"ihio\"},\"dateAdded\":{\"value\":\"0001-01-02\"},\"policyExpiry\":{\"value\":\"0023-02-03\"},\"deleted\":{\"value\":\"0203-02-03\"},\"premium\":{\"value\":\"5\"},\"premiumCredit\":{\"value\":\"4\"},\"cargo\":{\"value\":\"3\"},\"cargoCredit\":{\"value\":\"2\"}}]},\"equipmentSchedules\":{\"value\":[{\"type\":{\"value\":\"Motor Truck Cargo\"},\"itemNumber\":{\"value\":\"111\"},\"year\":{\"value\":3},\"make\":{\"value\":\"ford\"},\"model\":{\"value\":\"penis-XL\"},\"serialNumber\":{\"value\":\"oh\"},\"description\":{\"value\":\"do things\"},\"limit\":{\"value\":\"5\"}},{\"type\":{\"value\":\"junkinthetrunk\"},\"itemNumber\":{\"value\":\"50\"},\"year\":{\"value\":30},\"make\":{\"value\":\"make\"},\"model\":{\"value\":\"mode\"},\"serialNumber\":{\"value\":\"seri\"},\"description\":{\"value\":\"dec\"},\"limit\":{\"value\":\"501\"}}]},\"miscellaneousSchedules\":{\"value\":[{\"type\":{\"value\":\"miscsched\"},\"itemNumber\":{\"value\":\"033\"},\"year\":{\"value\":13},\"make\":{\"value\":\"klaj\"},\"model\":{\"value\":\"lkjkl\"},\"serialNumber\":{\"value\":\"hklj\"},\"description\":{\"value\":\"hlh\"},\"limit\":{\"value\":\"jkh\"}},{\"type\":{\"value\":\"Motor Truck Cargo\"},\"itemNumber\":{\"value\":\"303030\"},\"year\":{\"value\":193},\"make\":{\"value\":\"jklh\"},\"model\":{\"value\":\"jk\"},\"serialNumber\":{\"value\":\"hklj\"},\"description\":{\"value\":\"hklj\"},\"limit\":{\"value\":\"hkl\"}}]},\"photos\":{\"value\":[{\"photoNotes\":{\"value\":\"notes\"}}]}},{\"locationNumber\":{\"value\":\"#2\"},\"locationType\":{\"value\":\"Rural\"},\"locationAddress\":{\"value\":\"asdf\"},\"locationCity\":{\"value\":\"asdf\"},\"locationCountry\":{\"value\":\"asdf\"},\"locationProvinceState\":{\"value\":\"asdf\"},\"locationPostalCode\":{\"value\":\"asdf\"},\"inspection\":{\"value\":{\"yes\":true}},\"scopeOfInsuredProperty\":{\"value\":\"asdf\"},\"riskInfoType\":{\"value\":\"Commercial Equipment\"},\"riskInfoNotes\":{\"value\":\"asdf\"},\"riskInfoLimit\":{\"value\":\"asdf\"},\"constructionStories\":{\"value\":\"asdf\"},\"yearBuilt\":{\"value\":\"asdf\"},\"constructionArea\":{\"value\":\"asdf\"},\"constructionAreaUnit\":{\"value\":\"Sq. ft.\"},\"constructionWalls\":{\"value\":\"Frame w/ brick veneer\"},\"constructionFloors\":{\"value\":\"Concrete panels on steel structure\"},\"constructionBasement\":{\"value\":\"Non-combustible with masonry\"},\"constructionRoof\":{\"value\":\"Poured concrete\"},\"constructionRoofCovering\":{\"value\":\"Concrete on steel structure\"},\"constructionElectrical\":{\"value\":\"Fuses\"},\"constructionPlumbing\":{\"value\":\"Stainless Steel\"},\"constructionHeating\":{\"value\":\"Electric\"},\"constructionFuel\":{\"value\":\"Electric\"},\"renovationsNoneKnown\":{\"value\":{\"yes\":true}},\"renovationsHeating\":{\"value\":{\"yes\":true}},\"renovationsHeatingYear\":{\"value\":\"1\"},\"renovationsHeatingCompletePartial\":{\"value\":\"complete\"},\"renovationsRoof\":{\"value\":{\"yes\":false}},\"renovationsRoofYear\":{\"value\":\"1\"},\"fireHydrants\":{\"value\":\"Within 300m\"},\"fireDepartment\":{\"value\":\"Within 8km\"},\"extinguishingSystem\":{\"value\":\"None\"},\"extinguishingAgent\":{\"value\":\"automaticCO2\"},\"fireAlarm\":{\"value\":\"Monitoring Station (Full)\"},\"coveragePercent\":{\"value\":\"1\"},\"standpipe\":{\"value\":{\"yes\":true}},\"otherFireInfo\":{\"value\":\"asdf\"},\"protectionTypes\":{\"value\":{\"deadbolt\":true,\"watchmen\":true,\"additionalKey\":true,\"commonWalls\":true,\"holdupButtons\":true,\"perimeter\":true,\"steelPost\":true}},\"burglarAlarm\":{\"value\":\"Partial\"},\"safeType\":{\"value\":\"burglary\"},\"safeClass\":{\"value\":\"3\"},\"crimeProtectionOther\":{\"value\":\"asdf\"},\"occupancyInsured\":{\"value\":\"asdf\"},\"occupancyOthers\":{\"value\":\"asdf\"},\"exposuresClear\":{\"value\":{\"yes\":true}},\"coverageSchedules\":{\"value\":[{\"type\":{\"value\":\"Earnings – No Co-Insurance\"},\"category\":{\"value\":\"Business Interruption\"},\"deductible\":{\"value\":\"1\"},\"coIns\":{\"value\":\"1\"},\"limit\":{\"value\":\"1\"}},{\"type\":{\"value\":\"Owners’, Landlords’, and Tenants’ Liability\"},\"category\":{\"value\":\"Liability\"},\"deductible\":{\"value\":\"1\"},\"coIns\":{\"value\":\"1\"},\"limit\":{\"value\":\"1\"}},{\"type\":{\"value\":\"Business Interruption (Actual Loss)\"},\"category\":{\"value\":\"Machinery Breakdown\"},\"deductible\":{\"value\":\"1\"},\"coIns\":{\"value\":\"1\"},\"limit\":{\"value\":\"1\"}}]},\"autoSchedules\":{\"value\":[{\"itemNumber\":{\"value\":\"1\"},\"unitNumber\":{\"value\":\"1\"},\"owner\":{\"value\":\"Owner-operator\"},\"financeCompany\":{\"value\":\"asdf\"},\"year\":{\"value\":\"asdf\"},\"make\":{\"value\":\"asdf\"},\"model\":{\"value\":\"adfs\"},\"serialNumber\":{\"value\":\"adsf\"},\"plateNumber\":{\"value\":\"adfs\"},\"colour\":{\"value\":\"afds\"},\"lessor\":{\"value\":\"adfsdfs\"},\"dateAdded\":{\"value\":\"2222-02-02\"},\"policyExpiry\":{\"value\":\"0002-02-02\"},\"deleted\":{\"value\":\"0002-02-03\"},\"premium\":{\"value\":\"123\"},\"premiumCredit\":{\"value\":\"123\"},\"cargo\":{\"value\":\"123\"},\"cargoCredit\":{\"value\":\"123\"}},{\"itemNumber\":{\"value\":\"2\"},\"unitNumber\":{\"value\":\"2\"},\"owner\":{\"value\":\"Contractor\"},\"financeCompany\":{\"value\":\"asf\"},\"year\":{\"value\":\"hjgk\"},\"make\":{\"value\":\"jg\"},\"model\":{\"value\":\"gjhk\"},\"serialNumber\":{\"value\":\"ghjk\"},\"plateNumber\":{\"value\":\"ghj\"},\"colour\":{\"value\":\"ghk\"},\"lessor\":{\"value\":\"hgj\"},\"dateAdded\":{\"value\":\"0001-01-01\"},\"policyExpiry\":{\"value\":\"0001-01-01\"},\"deleted\":{\"value\":\"0001-01-01\"},\"premium\":{\"value\":\"123\"},\"premiumCredit\":{\"value\":\"123\"},\"cargo\":{\"value\":\"123\"},\"cargoCredit\":{\"value\":\"123\"}}]},\"equipmentSchedules\":{\"value\":[{\"type\":{\"value\":\"Miscellaneous Property\"},\"itemNumber\":{\"value\":\"123\"},\"year\":{\"value\":123},\"make\":{\"value\":\"asdf\"},\"model\":{\"value\":\"asdf\"},\"serialNumber\":{\"value\":\"adsf\"},\"description\":{\"value\":\"asdf\"},\"limit\":{\"value\":\"asdf\"}},{\"type\":{\"value\":\"asdf\"},\"itemNumber\":{\"value\":\"123\"},\"year\":{\"value\":123},\"make\":{\"value\":\"asdf\"},\"model\":{\"value\":\"asdf\"},\"serialNumber\":{\"value\":\"asdf\"},\"description\":{\"value\":\"asdf\"},\"limit\":{\"value\":\"asdf\"}}]},\"miscellaneousSchedules\":{\"value\":[{\"type\":{\"value\":\"Fine Arts\"},\"itemNumber\":{\"value\":\"123\"},\"year\":{\"value\":123},\"make\":{\"value\":\"123\"},\"model\":{\"value\":\"123\"},\"serialNumber\":{\"value\":\"123\"},\"description\":{\"value\":\"123\"},\"limit\":{\"value\":\"123\"}},{\"type\":{\"value\":\"asdf\"},\"itemNumber\":{\"value\":\"3333\"},\"year\":{\"value\":123},\"make\":{\"value\":\"asdf\"},\"model\":{\"value\":\"asdf\"},\"serialNumber\":{\"value\":\"asdf\"},\"description\":{\"value\":\"asdf\"},\"limit\":{\"value\":\"asdf\"}}]},\"photos\":{\"value\":[{\"photoNotes\":{\"value\":\"tasdf\"}}]}}]},\"name\":{\"updated_at\":1374106233232,\"value\":\"Namee\"},\"newClient\":{\"updated_at\":1374106460197,\"value\":{\"yes\":true}},\"notes\":{\"updated_at\":1374106451788,\"value\":\"how do i shot web\"},\"partTimeEmployees\":{\"updated_at\":1374106425489,\"value\":\"5\"},\"phone\":{\"updated_at\":1374106233232,\"value\":\"5199995555\"},\"postalCode\":{\"updated_at\":1374106233232,\"value\":\"AAA111\"},\"prevBroker\":{\"updated_at\":1374106390158,\"value\":\"Brool Story Co\"},\"prevInsurer\":{\"updated_at\":1374106390158,\"value\":\"Insurer Co\"},\"prevPolicyNumber\":{\"updated_at\":1374106390158,\"value\":\"300\"},\"prevPremium\":{\"updated_at\":1374106390158,\"value\":\"5\"},\"prevPremiumMonthlyOrAnnual\":{\"updated_at\":1374106390158,\"value\":\"annually\"},\"prevTermEnd\":{\"updated_at\":1374106390158,\"value\":\"2009-04-03\"},\"prevTermStart\":{\"updated_at\":1374106390158,\"value\":\"2009-03-03\"},\"province\":{\"updated_at\":1374106233232,\"value\":\"Provincee\"},\"renewalExplanation\":{\"updated_at\":1374106390158,\"value\":\"we suck dick\"},\"renewalOffered\":{\"updated_at\":1374106390158,\"value\":\"no\"},\"requiredBy\":{\"updated_at\":1374106445802,\"value\":\"2009-01-01\"},\"updated_at\":\"2013-07-18T00:24:34Z\",\"website\":{\"updated_at\":1374106233232,\"value\":\"test.com\"}}"

This is probably just a weird one-time thing, but it may be useful for the future.

hansonw commented 11 years ago

Are you sure everything was up to date? Those line numbers don't match anything in the file.

DouglasSherk commented 11 years ago

Yes.

hansonw commented 11 years ago

I think it's fixed now. Let me know if it happens again